MCPcopy
hub / github.com/perkeep/perkeep / defaultServer

Function defaultServer

pkg/client/config.go:294–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

292}
293
294func 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
305func (c *Client) useTLS() bool {
306 return strings.HasPrefix(c.discoRoot(), "https://")

Callers 1

getServerFunction · 0.85

Calls 1

cleanServerFunction · 0.85

Tested by

no test coverage detected