version

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package version contains compile-time version information.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the version of the binary.
	Version = "unknown"
	// Commit is the git commit of the binary.
	Commit = "unknown"
	// BuildDate is the date the binary was built.
	BuildDate = "unknown"
)

Functions

This section is empty.

Types

type BuildInfo added in v0.13.0

type BuildInfo struct {
	Version   string `json:"version"`
	GitCommit string `json:"gitCommit"`
	BuildDate string `json:"buildDate"`
}

BuildInfo is the current build information.

func GetBuildInfo added in v0.13.0

func GetBuildInfo() BuildInfo

GetBuildInfo returns the current build information.

func (BuildInfo) MarshalJSON added in v0.15.2

func (b BuildInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (BuildInfo) PrettyJSON added in v0.15.2

func (b BuildInfo) PrettyJSON(component string) string

PrettyJSON returns the current build information as a pretty-printed JSON string.

Jump to

Keyboard shortcuts

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