version

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v1.8.0

func Get() string

Get returns the version string.

func ProductToken added in v1.5.0

func ProductToken() string

ProductToken returns a tag to be poked in User Agent headers.

func Set added in v1.5.0

func Set(v string)

Set initializes the version string as global variable.

Types

type Version

type Version struct {
	Major  int64
	Minor  int64
	Patch  int64
	Commit string
	Date   string
}

Version stores the SemVer release information along with the commit that produced the release and other useful information.

func New

func New(version, commit, date string) Version

New parses the version string and return the version instance.

func (Version) Render

func (v Version) Render()

Render dumps the version information to stdout.

Jump to

Keyboard shortcuts

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