version

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package version carries the build version.

There are three ways this binary gets built, and all three have to end up reporting something true:

  • a release, where GoReleaser stamps all three vars through -ldflags;
  • `make build`, which stamps Version from `git describe`;
  • `go install github.com/simtabi/authama/src/cmd/authama@latest`, which applies no ldflags at all.

The third is the one the README tells people to use, and it used to report the hardcoded default - "2.0.0-dev", from a binary built out of v3 sources. Go already records the real answer in the binary (`go version -m` shows it), so nothing needed to be threaded through the build: it just had to be read.

Index

Constants

This section is empty.

Variables

View Source
var Commit = ""

Commit is the short git commit the binary was built from. Release builds stamp it via -ldflags; otherwise it comes from the VCS stamp Go embeds when building inside a repository.

View Source
var Date = ""

Date is the build/commit date (RFC 3339), stamped or recovered the same way.

View Source
var Version = devDefault

Version is the authama version. Release builds override it through -ldflags "-X .../internal/version.Version=..."; otherwise it is recovered from the build info Go embeds.

Functions

func IsDev

func IsDev() bool

IsDev reports whether nothing ever supplied a version - neither a stamp nor the module system. Callers use it to decide whether to say so out loud rather than inferring it from an absent commit, which a `go install` build also has.

Types

This section is empty.

Jump to

Keyboard shortcuts

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