version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package version provides centralized version management for GABS. The version information can be injected at build time using -ldflags.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the main version string for GABS.
	// Can be overridden at build time: go build -ldflags "-X github.com/pardeike/gabs/internal/version.Version=v1.0.0"
	Version = "0.2.0"

	// BuildDate is when the binary was built.
	// Can be overridden at build time: go build -ldflags "-X github.com/pardeike/gabs/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
	BuildDate = "unknown"

	// Commit is the git commit hash this binary was built from.
	// Can be overridden at build time: go build -ldflags "-X github.com/pardeike/gabs/internal/version.Commit=$(git rev-parse HEAD)"
	Commit = "unknown"
)

Functions

func Get

func Get() string

Get returns the version string.

func GetBuildDate

func GetBuildDate() string

GetBuildDate returns the build date.

func GetCommit

func GetCommit() string

GetCommit returns the git commit hash.

func GetDetailedVersionInfo

func GetDetailedVersionInfo() string

GetDetailedVersionInfo returns a formatted string with detailed version information.

func GetFullVersionInfo

func GetFullVersionInfo() string

GetFullVersionInfo returns a formatted string with all version information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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