PreferredInstallation returns the best installation method for the schema. Order matches the Python implementation: docker, uvx, npm, python, custom.
()
| 159 | // PreferredInstallation returns the best installation method for the schema. |
| 160 | // Order matches the Python implementation: docker, uvx, npm, python, custom. |
| 161 | func (s ServerSchema) PreferredInstallation() (string, InstallationEntry, bool) { |
| 162 | for _, key := range []string{"docker", "uvx", "npm", "python", "custom"} { |
| 163 | if entry, ok := s.Installations[key]; ok { |
| 164 | return key, entry, true |
| 165 | } |
| 166 | } |
| 167 | for key, entry := range s.Installations { |
| 168 | return key, entry, true |
| 169 | } |
| 170 | return "", InstallationEntry{}, false |
| 171 | } |
no outgoing calls
no test coverage detected