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

Function remoteNameSortScore

context/remote.go:60–71  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

58}
59
60func remoteNameSortScore(name string) int {
61 switch strings.ToLower(name) {
62 case "upstream":
63 return 3
64 case "github":
65 return 2
66 case "origin":
67 return 1
68 default:
69 return 0
70 }
71}
72
73// https://golang.org/pkg/sort/#Interface
74func (r Remotes) Len() int { return len(r) }

Callers 1

LessMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected