MCPcopy Index your code
hub / github.com/cli/cli / normalizeExtension

Function normalizeExtension

pkg/cmd/extension/manager.go:880–885  ·  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

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

Callers 3

Test_ensurePrefixedFunction · 0.85
RemoveMethod · 0.85
UpdateDirMethod · 0.85

Calls

no outgoing calls

Tested by 1

Test_ensurePrefixedFunction · 0.68