MCPcopy
hub / github.com/cli/cli / isSupportedProtocol

Function isSupportedProtocol

git/url.go:12–19  ·  view source on GitHub ↗
(u string)

Source from the content-addressed store, hash-verified

10}
11
12func isSupportedProtocol(u string) bool {
13 return strings.HasPrefix(u, "ssh:") ||
14 strings.HasPrefix(u, "git+ssh:") ||
15 strings.HasPrefix(u, "git:") ||
16 strings.HasPrefix(u, "http:") ||
17 strings.HasPrefix(u, "git+https:") ||
18 strings.HasPrefix(u, "https:")
19}
20
21func isPossibleProtocol(u string) bool {
22 return isSupportedProtocol(u) ||

Callers 2

IsURLFunction · 0.85
isPossibleProtocolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected