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

Function normalizeExtension

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

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

Callers 3

Test_ensurePrefixedFunction · 0.85
RemoveMethod · 0.85
UpdateDirMethod · 0.85

Calls

no outgoing calls

Tested by 1

Test_ensurePrefixedFunction · 0.68