version

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version is the single source of truth for the confessecrets release version. Number is a const so any package can reference it directly (e.g. in scan output, User-Agent strings, or logs) without an import cycle.

Index

Constants

View Source
const Number = "0.0.7"

Number is the canonical release version. Bump this in the same commit you tag, keeping the tag and the const in lockstep:

# edit Number -> "0.0.3", commit, then:
git tag -a v0.0.3 -m "v0.0.3"

It is a const so it can be referenced anywhere as version.Number. Because consts cannot be overridden by -ldflags, only the build metadata below is stamped at build time.

Variables

View Source
var (
	Commit = ""
	Date   = ""
)

Build metadata, stamped on release builds via -ldflags, e.g.:

go build -ldflags "\
  -X github.com/rezen/confessecrets/pkg/version.Commit=$(git rev-parse --short HEAD) \
  -X github.com/rezen/confessecrets/pkg/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  ./cmd/confessecrets

Functions

func String

func String() string

String renders the full version line: the const Number plus whatever build metadata is available, falling back to the info Go embeds automatically for `go install module@version` or VCS checkouts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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