Documentation
¶
Overview ¶
Package version is the version group: osapi version, which prints the build of the binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Group = command.Register(command.Define( "version", "Display the version of osapi", command.Flat(), command.Uses[Deps](), command.Method[Input, Info]("version"). Short("Display the version of osapi"). Long("The build of this binary: the version that each component reports, the\n"+ "commit and the tree it was built from, and the Go that built it."). Example(""). Prints(sampleInfo). Example("--json"). Handle(Version), ))
Group is the version group's definition. It is flat, so its method is a command of the root: osapi version.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Build is the build of the binary, which the release sets with
// -ldflags in cmd/.
Build func() Info
}
Deps is what the version group's method uses.
type Info ¶
type Info struct {
Version string ` json:"version"`
Commit string ` json:"commit"`
TreeState string ` json:"tree_state" label:"Tree"`
BuildDate string ` json:"build_date" label:"Built"`
BuiltBy string ` json:"built_by"`
GoVersion string ` json:"go_version" label:"Go"`
Platform string ` json:"platform"`
Compiler string ` json:"compiler" render:"-"`
ModuleSum string ` json:"module_checksum" render:"-"`
// contains filtered or unexported fields
}
Info is the build of the binary.