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

Function isNumber

pkg/cmd/browse/browse.go:345–348  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

343}
344
345func isNumber(arg string) bool {
346 _, err := strconv.Atoi(strings.TrimPrefix(arg, "#"))
347 return err == nil
348}
349
350// sha1 and sha256 are supported
351var commitHash = regexp.MustCompile(`\A[a-f0-9]{7,64}\z`)

Callers 2

NewCmdBrowseFunction · 0.85
parseSectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected