version

package
v0.0.0-...-56a5168 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Git tag
	Tag string
	// Git commit
	Commit string
	// Working tree state
	Tree string
	// Database version
	Database string
	// Go architecture
	Arch = runtime.GOARCH
	// Go version
	Go = runtime.Version()
	// Build OS
	OS = runtime.GOOS
	// Build date
	Date string
)

Functions

This section is empty.

Types

type GitVersion

type GitVersion struct {
	Tag    string           `yaml:"tag" json:"tag"`
	Commit string           `yaml:"commit" json:"commit"`
	Tree   WorkingTreeState `yaml:"working_tree" json:"working_tree"`
}

type GoMetadata

type GoMetadata struct {
	Version string `yaml:"version" json:"version"`
	Arch    string `yaml:"arch" json:"arch"`
	OS      string `yaml:"os" json:"os"`
}

type Version

type Version struct {
	Git      GitVersion `yaml:"git" json:"git"`
	Database string     `yaml:"database" json:"database"`
	Go       GoMetadata `yaml:"go" json:"go"`
	Date     string     `yaml:"build_date" json:"build_date"`
}

func Get

func Get() *Version

type WorkingTreeState

type WorkingTreeState string
const (
	TREE_CLEAN WorkingTreeState = "clean"
	TREE_DIRTY WorkingTreeState = "dirty"
)

Jump to

Keyboard shortcuts

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