version

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package version exposes the module version from Go build info and structured version information set via ldflags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModuleVersion

func ModuleVersion() string

ModuleVersion returns the module version from Go build info, falling back to "(devel)" when the binary is built without version metadata.

Types

type Info added in v0.0.9

type Info struct {
	Version      string `json:"version"`
	Commit       string `json:"commit"`
	GitTreeState string `json:"gitTreeState"`
	BuildDate    string `json:"buildDate"`
}

Info holds structured version information injected at build time.

func Get added in v0.0.9

func Get() Info

Get returns the structured version information populated by ldflags at build time.

Jump to

Keyboard shortcuts

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