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

Function normalizeExtension

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

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

Callers 3

Test_ensurePrefixedFunction · 0.85
RemoveMethod · 0.85
UpdateDirMethod · 0.85

Calls

no outgoing calls

Tested by 1

Test_ensurePrefixedFunction · 0.68