version

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package version provides a version information writer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Information

type Information struct {
	AppName        string
	RepositoryName string
	Version        string
	Revision       Revision
	Branch         string
	BuildUser      string
	BuildDate      string
	GoVersion      string
	GoOS           string
	GoArch         string
	Dependencies   []*debug.Module
}

Information holds app version info.

func Info

func Info() Information

Info returns app version info.

type Revision

type Revision struct {
	ID    string
	Dirty bool
}

Revision returns the current revision of the code.

func (Revision) Short

func (r Revision) Short() string

Short returns the short revision string.

func (Revision) String

func (r Revision) String() string

String returns the revision string.

Jump to

Keyboard shortcuts

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