MCPcopy
hub / github.com/helmfile/helmfile / ParseNormalProtocol

Function ParseNormalProtocol

pkg/remote/remote.go:191–203  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

189}
190
191func ParseNormalProtocol(path string) (string, error) {
192 parts := strings.Split(path, "://")
193
194 if len(parts) == 0 {
195 return "", fmt.Errorf("failed to parse URL %s", path)
196 }
197 protocol := strings.ToLower(parts[0])
198
199 if slices.Contains(protocols, protocol) {
200 return protocol, nil
201 }
202 return "", fmt.Errorf("failed to parse URL %s", path)
203}
204
205func (r *Remote) Fetch(path string, cacheDirOpt ...string) (string, error) {
206 u, err := Parse(path)

Callers 1

ParseNormalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected