MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / isURLPath

Function isURLPath

pkg/policies/policies.go:1056–1059  ·  view source on GitHub ↗

isURLPath checks if a path is an HTTP or HTTPS URL

(path string)

Source from the content-addressed store, hash-verified

1054
1055// isURLPath checks if a path is an HTTP or HTTPS URL
1056func isURLPath(path string) bool {
1057 scheme, _ := RefParts(path)
1058 return scheme == httpScheme || scheme == httpsScheme
1059}
1060
1061// resolveReference resolves a reference (which may be relative) against a base path
1062// If ref is absolute (has a scheme), it returns ref as-is

Callers 3

TestIsURLPathMethod · 0.85
loadPolicyScriptFunction · 0.85
loadLegacyPolicyScriptFunction · 0.85

Calls 1

RefPartsFunction · 0.85

Tested by 1

TestIsURLPathMethod · 0.68