MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / validateAPIPath

Function validateAPIPath

pkg/cmd/api/api.go:83–89  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

81}
82
83func validateAPIPath(path string) error {
84 trimmed := strings.TrimLeft(path, "/")
85 if !strings.HasPrefix(trimmed, "api") {
86 return fmt.Errorf("the api command only supports paths prefixed with /api (e.g. /api/spaces)")
87 }
88 return nil
89}

Callers 1

apiRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected