Documentation
¶
Overview ¶
Package release is the port for finding Scrutiny's latest release tag, and the Checker that looks for a New Version in the background.
Index ¶
Constants ¶
const Module = "github.com/Coombszy/scrutiny"
Module is Scrutiny's module path, as stamped into the binary.
Variables ¶
var BuildVersion = sync.OnceValue(func() string { info, ok := debug.ReadBuildInfo() if !ok { return "" } return info.Main.Version })
BuildVersion is the module version Go stamped into the binary: the tag for `go install …@v0.1.0` or a build of a clean tagged checkout, a pseudo-version for an untagged commit, "(devel)" for `go run`.
Functions ¶
Types ¶
type Checker ¶
type Checker struct {
Source Source
Current string // the running build's version
// contains filtered or unexported fields
}
Checker looks for a New Version: a release newer than Current.
func (*Checker) Check ¶
Check asks the Source for the latest release, keeping the last one found if it cannot say.
func (*Checker) Enabled ¶
Enabled reports whether Current is a release build worth checking for: dev builds ("(devel)", pseudo-versions, dirty "+" builds) never look.
func (*Checker) NewVersion ¶
NewVersion is the latest release if it is newer than Current, otherwise "". Dev builds have no New Version, and prereleases are never offered.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package goproxy finds a module's latest release from a Go module proxy (https://go.dev/ref/mod#goproxy-protocol), as `go install …@latest` would.
|
Package goproxy finds a module's latest release from a Go module proxy (https://go.dev/ref/mod#goproxy-protocol), as `go install …@latest` would. |