Documentation ¶
Index ¶
- Variables
- type SysBuildInfoHelper
- func (instance *SysBuildInfoHelper) AddFlag(f *flag.FlagSet)
- func (instance *SysBuildInfoHelper) IsDirtyBuild() bool
- func (instance *SysBuildInfoHelper) LastCommit() time.Time
- func (instance *SysBuildInfoHelper) Revision() string
- func (instance *SysBuildInfoHelper) Short() string
- func (instance *SysBuildInfoHelper) Version() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version will be the version tag if the binary is built with "go install url/tool@version". // If the binary is built some other way, it will be "(devel)". Version = "unknown" // Revision is taken from the vcs.revision tag in Go 1.18+. Revision = "unknown" // LastCommit is taken from the vcs.time tag in Go 1.18+. LastCommit time.Time // DirtyBuild is taken from the vcs.modified tag in Go 1.18+. DirtyBuild = true )
Functions ¶
This section is empty.
Types ¶
type SysBuildInfoHelper ¶
type SysBuildInfoHelper struct { }
var SysBuildInfo *SysBuildInfoHelper
func (*SysBuildInfoHelper) AddFlag ¶
func (instance *SysBuildInfoHelper) AddFlag(f *flag.FlagSet)
AddFlag adds -v and -version flags to the FlagSet. If triggered, the flags print version information and call os.Exit(0). If FlagSet is nil, it adds the flags to flag.CommandLine.
func (*SysBuildInfoHelper) IsDirtyBuild ¶
func (instance *SysBuildInfoHelper) IsDirtyBuild() bool
func (*SysBuildInfoHelper) LastCommit ¶
func (instance *SysBuildInfoHelper) LastCommit() time.Time
func (*SysBuildInfoHelper) Revision ¶
func (instance *SysBuildInfoHelper) Revision() string
func (*SysBuildInfoHelper) Short ¶
func (instance *SysBuildInfoHelper) Short() string
func (*SysBuildInfoHelper) Version ¶
func (instance *SysBuildInfoHelper) Version() string
Click to show internal directories.
Click to hide internal directories.