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

Function versionGreaterThan

internal/update/update.go:169–180  ·  view source on GitHub ↗
(v, w string)

Source from the content-addressed store, hash-verified

167}
168
169func versionGreaterThan(v, w string) bool {
170 w = gitDescribeSuffixRE.ReplaceAllStringFunc(w, func(m string) string {
171 idx := strings.IndexRune(m, '-')
172 n, _ := strconv.Atoi(m[0:idx])
173 return fmt.Sprintf("%d-pre.0", n+1)
174 })
175
176 vv, ve := version.NewVersion(v)
177 vw, we := version.NewVersion(w)
178
179 return ve == nil && we == nil && vv.GreaterThan(vw)
180}
181
182// IsTerminal determines if a file descriptor is an interactive terminal / TTY.
183func IsTerminal(f *os.File) bool {

Callers 1

CheckForUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected