Documentation
¶
Index ¶
- Variables
- func IsRelease() bool
- func JSON() (string, error)
- func Short() string
- func String() string
- type BuildInfo
- type Info
- func (i *Info) GetArchitecture() string
- func (i *Info) GetBranch() string
- func (i *Info) GetBuildTime() time.Time
- func (i *Info) GetCommit() string
- func (i *Info) GetGoVersion() string
- func (i *Info) GetPlatform() string
- func (i *Info) GetVersion() string
- func (i *Info) Info() Info
- func (i *Info) IsRelease() bool
- func (i *Info) JSON() (string, error)
- func (i *Info) Short() string
- func (i *Info) String() string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type BuildInfo ¶
type BuildInfo interface { GetVersion() string GetCommit() string GetBranch() string GetBuildTime() time.Time GetGoVersion() string GetPlatform() string GetArchitecture() string IsRelease() bool String() string Short() string JSON() (string, error) Info() Info }
BuildInfo defines the interface for build information
type Info ¶
type Info struct { Version string `json:"version"` GitCommit string `json:"gitCommit"` GitBranch string `json:"gitBranch"` BuildTime time.Time `json:"buildTime"` GoVersion string `json:"goVersion"` Platform string `json:"platform"` Architecture string `json:"architecture"` }
Info contains all build-time information
func (*Info) GetArchitecture ¶
func (*Info) GetBuildTime ¶
func (*Info) GetGoVersion ¶
func (*Info) GetPlatform ¶
func (*Info) GetVersion ¶
Click to show internal directories.
Click to hide internal directories.