(endpoint string)
| 194 | } |
| 195 | |
| 196 | func rootModelsURL(endpoint string) string { |
| 197 | trimmed := strings.TrimRight(endpoint, "/") |
| 198 | if strings.HasSuffix(trimmed, "/models") { |
| 199 | return withModelQuery(trimmed) |
| 200 | } |
| 201 | return withModelQuery(trimmed + "/models") |
| 202 | } |
| 203 | |
| 204 | func withModelQuery(endpoint string) string { |
| 205 | parsed, err := url.Parse(endpoint) |
no test coverage detected