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

Function versionGreaterThan

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

Source from the content-addressed store, hash-verified

178}
179
180func versionGreaterThan(v, w string) bool {
181 w = gitDescribeSuffixRE.ReplaceAllStringFunc(w, func(m string) string {
182 idx := strings.IndexRune(m, '-')
183 n, _ := strconv.Atoi(m[0:idx])
184 return fmt.Sprintf("%d-pre.0", n+1)
185 })
186
187 vv, ve := version.NewVersion(v)
188 vw, we := version.NewVersion(w)
189
190 return ve == nil && we == nil && vv.GreaterThan(vw)
191}
192
193// IsTerminal determines if a file descriptor is an interactive terminal / TTY.
194func IsTerminal(f *os.File) bool {

Callers 1

CheckForUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected