version

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 5 Imported by: ? 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 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/version.Version=v1.2.3
-X github.com/jmooring/hvm/version.CommitHash=abcdef7
-X github.com/jmooring/hvm/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