version

package
v0.35.12 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Unlicense Imports: 1 Imported by: 0

Documentation

Overview

Package version contains the version information.

Example of the build command:

PKG="github.com/AdguardTeam/golibs/version"

go build -ldflags " \
	-X ${PKG}.version=1.0.0 \
	-X ${PKG}.committime=2026-04-20T10:00:00Z \
	-X ${PKG}.revision="e3133f34fsdsd34fsfdbxffd54edf2123cds1ds0" \
	-X ${PKG}.branch="AGDNS-0000-test" \
	"

Index

Constants

View Source
const RaceEnabled = false

RaceEnabled is true if the current binary has been built with --race.

Variables

This section is empty.

Functions

func Branch

func Branch() (b string)

Branch returns the compiled-in value of the Git branch.

func CommitTime

func CommitTime() (t string)

CommitTime returns the compiled-in value of the commit time as a string.

func Revision

func Revision() (r string)

Revision returns the compiled-in value of the Git revision.

func Version

func Version() (v string)

Version returns the compiled-in value of the build version as a string. It returns either the compiled-in value or the one from the environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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