MCPcopy
hub / github.com/smallstep/cli / getHost

Function getHost

utils/cautils/bootstrap.go:319–331  ·  view source on GitHub ↗
(caURL string)

Source from the content-addressed store, hash-verified

317}
318
319func getHost(caURL string) (string, error) {
320 u, err := url.Parse(caURL)
321 if err != nil {
322 return "", err
323 }
324 host := u.Host
325 if strings.Contains(host, ":") {
326 if host, _, err = net.SplitHostPort(host); err != nil {
327 return "", err
328 }
329 }
330 return host, nil
331}
332
333type apiError struct {
334 StatusCode int `json:"statusCode"`

Callers 1

BootstrapAuthorityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…