version

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package version provides build and version information.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version    string
	CommitHash string
	BuildDate  string
)

These variables are optionally set at build time via ldflags. For example:

-X github.com/jmooring/hvm/pkg/version.Version=v1.2.3
-X github.com/jmooring/hvm/pkg/version.CommitHash=abcdef7
-X github.com/jmooring/hvm/pkg/version.BuildDate=2026-01-09T00:00:00Z

Functions

This section is empty.

Types

type Info

type Info struct {
	Name       string
	Version    string
	CommitHash string
	BuildDate  string
}

Info contains build and version metadata.

func NewInfo

func NewInfo(name string) Info

NewInfo creates a new Info instance with current build information.

func (Info) String

func (i Info) String() string

String returns a formatted version string with all metadata.

Jump to

Keyboard shortcuts

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