version

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

* @Author: robert zhang <robertzhangwenjie@gmail.com> * @Date: 2022-08-22 10:02:39 * @LastEditTime: 2022-08-22 10:53:08 * @LastEditors: robert zhang * @Description:

Index

Constants

This section is empty.

Variables

View Source
var (
	// GitVersion is semantic version.
	GitVersion = ""
	// BuildDate in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ').
	BuildTime = ""
	// GitCommit sha1 from git, output of $(git rev-parse HEAD).
	GitCommit = ""
	// GitTreeState state of git tree, either "clean" or "dirty".
	GitTreeState = ""
	GoVersion    = ""
)

Functions

This section is empty.

Types

type Info

type Info struct {
	GitVersion   string `json:"GitVersion,omitempty"`
	GitCommit    string `json:"GitCommit"`
	GitTreeState string `json:"GitTreeState"`
	BuildTime    string `json:"BuildDate"`
	GoVersion    string `json:"GoVersion"`
	Compiler     string `json:"Compiler"`
	Platform     string `json:"Platform"`
}

Info contains versioning information.

func Get

func Get() Info

Get returns the overall codebase version. It's for detecting what code a binary was built from.

func (Info) Table

func (info Info) Table() *uitable.Table

func (Info) ToJSON

func (info Info) ToJSON() string

ToJSON returns the JSON string of version information.

Jump to

Keyboard shortcuts

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