version

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBuildSummary

func GetBuildSummary() string

GetBuildSummary returns a one-line build summary

func GetDetailedVersion

func GetDetailedVersion() string

GetDetailedVersion returns comprehensive version information

func GetJSONVersion

func GetJSONVersion() string

GetJSONVersion returns version info in JSON format

func GetShortVersion

func GetShortVersion() string

GetShortVersion returns a concise version string

func GetVersion

func GetVersion() string

GetVersion returns a simple version string

func GetVersionWithCommit

func GetVersionWithCommit() string

GetVersionWithCommit returns version with commit info

func IsDevelopment

func IsDevelopment() bool

IsDevelopment checks if this is a development build

func IsRelease

func IsRelease() bool

IsRelease checks if this is a release build

Types

type BuildInfo

type BuildInfo struct {
	Version    string `json:"version"`
	GitCommit  string `json:"git_commit"`
	GitBranch  string `json:"git_branch"`
	GitTag     string `json:"git_tag"`
	BuildDate  string `json:"build_date"`
	GoVersion  string `json:"go_version"`
	Platform   string `json:"platform"`
	Compiler   string `json:"compiler"`
	IsModified bool   `json:"is_modified"`
	ModulePath string `json:"module_path"`
	ModuleSum  string `json:"module_sum"`
}

BuildInfo contains all build information

func GetBuildInfo

func GetBuildInfo() BuildInfo

GetBuildInfo extracts comprehensive build information from runtime debug info

Jump to

Keyboard shortcuts

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