version

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 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"
	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

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"`
	HarpSdkVersion string     `json:"harp_sdk_version,omitempty"`
}

Map provides the iterable version information.

func NewInfo

func NewInfo() Info

NewInfo returns a build information object.

func (*Info) JSON

func (i *Info) JSON() string

JSON returns json representation of build info.

func (*Info) String

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