version

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"     // -ldflags "-X pkg/version.Version=v1.2.3"
	GitCommit = "unknown" // -ldflags "-X pkg/version.GitCommit=abc123"
	BuildTime = "unknown" // -ldflags "-X pkg/version.BuildTime=2024-01-01T12:00:00Z"
	GoVersion = runtime.Version()
	Platform  = fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)
)

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	GitCommit string `json:"git_commit"`
	BuildTime string `json:"build_time"`
	GoVersion string `json:"go_version"`
	Platform  string `json:"platform"`
}

func Get

func Get() Info

func (Info) String

func (i Info) String() string

Jump to

Keyboard shortcuts

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