Help us shape the future of Go! Take the 2026 Go Developer Survey

buildmeta

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package buildmeta resolves application version inputs without executing source code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Revision

func Revision(ctx context.Context, root string) (string, error)

Revision reads SHA-1 file references without launching Git or loading its object database.

Types

type Info

type Info struct {
	Version string
	Core    string
	Commit  string
}

func Parse

func Parse(value string) (Info, error)

func Source

func Source(path, symbol string) (Info, error)

Source reads a named top-level string declaration. Literal strings, local string aliases, parentheses and concatenation are supported; calls are never evaluated. It does not execute init functions or import the application.

func (Info) Prerelease

func (info Info) Prerelease() bool

func (Info) Windows

func (info Info) Windows() ([4]uint16, error)

Windows returns a four-component numeric resource version. The complete semantic version remains available separately for display and comparison.

Jump to

Keyboard shortcuts

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