Documentation
¶
Overview ¶
Package version owns the executable identity shared by commands and evidence.
Index ¶
Constants ¶
const Module = "github.com/zoumo/agent-sdk-testify"
Variables ¶
This section is empty.
Functions ¶
func ExactModuleVersion ¶
ExactModuleVersion reports whether value is a release or pseudo-version accepted by the Go module version grammar.
func String ¶
func String() string
String returns the tagged executable version, or "devel" outside a release.
func ValidCommitTime ¶
ValidCommitTime reports whether value is an RFC 3339 VCS commit timestamp.
func ValidModuleSum ¶
ValidModuleSum reports whether value is an exact h1 module content sum.
func ValidRevision ¶
ValidRevision reports whether value is a full Git object revision.
Types ¶
type BuildIdentity ¶
type BuildIdentity struct {
Module string
Version string
Sum string
Revision string
Time string
GoVersion string
}
BuildIdentity is the exact source identity of the embedded library.
func ReadEmbeddedIdentity ¶
func ReadEmbeddedIdentity() (BuildIdentity, error)
ReadEmbeddedIdentity returns the source identity recorded by Go build info.
func ResolveEmbeddedIdentity ¶
func ResolveEmbeddedIdentity(provided *EmbeddedIdentity) (BuildIdentity, error)
ResolveEmbeddedIdentity reads build information and uses provided only when the module is absent. A self-proven identity remains authoritative.