MCPcopy Create free account
hub / github.com/cli/cli / normalizeExtension

Function normalizeExtension

pkg/cmd/extension/manager.go:881–886  ·  view source on GitHub ↗

normalizeExtension makes sure that the provided extension name is prefixed with "gh-".

(name string)

Source from the content-addressed store, hash-verified

879
880// normalizeExtension makes sure that the provided extension name is prefixed with "gh-".
881func normalizeExtension(name string) string {
882 if !strings.HasPrefix(name, "gh-") {
883 name = "gh-" + name
884 }
885 return name
886}

Callers 3

Test_ensurePrefixedFunction · 0.85
RemoveMethod · 0.85
UpdateDirMethod · 0.85

Calls

no outgoing calls

Tested by 1

Test_ensurePrefixedFunction · 0.68