Help us shape the future of Go! Take the 2026 Go Developer Survey

version

package
v0.5.15 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Version    string `json:"version,omitempty"`
	Prerelease string `json:"prerelease,omitempty"`
	Metadata   string `json:"build_metadata,omitempty"`
	Revision   string `json:"revision,omitempty"`
	BuildDate  string `json:"build_date,omitempty"`
}

Version is a container for version information.

func GetVersion

func GetVersion() Version

GetVersion produces a Version that includes fields set based on version package variables.

func (Version) FullVersionNumber

func (v Version) FullVersionNumber(rev bool) string

FullVersionNumber produces a human-readable string representation of the Version object. In addition to a short slug that includes the product name (hcdiag) and the semantic version, the Revision will be included if the optional argument, `rev`, is true. Further, if a buildDate is set, it is also included in the output.

func (Version) SemanticVersion

func (v Version) SemanticVersion() string

SemanticVersion produces a semantic version number from a Version object.

Jump to

Keyboard shortcuts

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