()
| 292 | } |
| 293 | |
| 294 | func defaultServer() (string, error) { |
| 295 | configOnce.Do(parseConfig) |
| 296 | wantAlias := os.Getenv("CAMLI_DEFAULT_SERVER") |
| 297 | for alias, serverConf := range config.Servers { |
| 298 | if (wantAlias != "" && wantAlias == alias) || (wantAlias == "" && serverConf.IsDefault) { |
| 299 | return cleanServer(serverConf.Server) |
| 300 | } |
| 301 | } |
| 302 | return "", nil |
| 303 | } |
| 304 | |
| 305 | func (c *Client) useTLS() bool { |
| 306 | return strings.HasPrefix(c.discoRoot(), "https://") |
no test coverage detected