version

package
v0.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name      = "unknown"
	AppName   = "unknown"
	Version   = "unknown"
	Commit    = "unknown"
	Branch    = "unknown"
	BuildDate = "unknown"
	GoVersion = "unknown"
	BuildTags = "unknown"
)

Build information. Populated at build-time.

Functions

func Command

func Command() *cobra.Command

Command exports Cobra command builder

func ID

func ID() string

ID returns an instance id

Types

type Info added in v0.1.19

type Info struct {
	Name           string     `json:"name"`
	ComponentName  string     `json:"component_name"`
	Version        string     `json:"version"`
	GitBranch      string     `json:"branch"`
	GitCommit      string     `json:"commit"`
	BuildTags      string     `json:"build_tags"`
	GoVersion      string     `json:"go"`
	BuildDeps      []buildDep `json:"build_deps"`
	BuildDate      string     `json:"build_date"`
	HarpSdkVersion string     `json:"harp_sdk_version,omitempty"`
}

Map provides the iterable version information.

func NewInfo added in v0.1.19

func NewInfo() Info

NewInfo returns a build information object.

func (*Info) JSON added in v0.1.19

func (i *Info) JSON() string

JSON returns json representation of build info

func (*Info) String added in v0.1.19

func (i *Info) String() string

Full returns full composed version string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL