Documentation
¶
Overview ¶
Package version provides build-time version information for GoatFlow. These variables are set at build time via -ldflags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Version is the GoatFlow release this source tree is (e.g. "0.10.0"). Version = "0.10.0" // GitCommit is the short git commit SHA GitCommit = "unknown" // GitBranch is the git branch name GitBranch = "unknown" // BuildDate is the build timestamp BuildDate = "unknown" )
Version is set in source by scripts/prepare-release.sh (never via ldflags) and checked against the release tag in CI. The other three are injected by the Dockerfile with -ldflags -X.
Functions ¶
func HostCompatible ¶ added in v0.10.0
HostCompatible reports whether the running GoatFlow satisfies a plugin's minimum host version. An empty minimum always matches. A development build (Version "dev", empty, or any non-semver branch name) matches everything, so untagged builds never lock plugins out.
func RequireHost ¶ added in v0.10.0
RequireHost returns an *IncompatibleError when the running GoatFlow does not satisfy minVersion (see HostCompatible), nil otherwise.
Types ¶
type IncompatibleError ¶ added in v0.10.0
type IncompatibleError struct {
Plugin string
PluginVersion string
MinHostVersion string
HostVersion string
}
IncompatibleError reports a plugin version whose minimum GoatFlow version is newer than the running host.
func (*IncompatibleError) Error ¶ added in v0.10.0
func (e *IncompatibleError) Error() string