version

package
v0.0.0-...-dbd9761 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Name is the name of the application or plugin.
	Name string
	// Description is a one-liner description of the application or plugin.
	Description string
	// Copyright is the copyright clause of the application or plugin.
	Copyright string
	// License is the license under which the code is released.
	License string
	// LicenseURL is the URL at which the license is available.
	LicenseURL string
	// BuildTime is the time at which the application was built.
	BuildTime string
	// GitTag is the current Git tag (e.g. "1.0.3").
	GitTag string
	// GitCommit is the commit of this version of the application.
	GitCommit string
	// GitTime is the modification time associated with the Git commit.
	GitTime string
	// GitModified reports whether the repository had outstanding local changes at time of build.
	GitModified string
	// GoVersion is the version of the Go compiler used in the build process.
	GoVersion string
	// GoOS is the operating system used to build this application; it may differ
	// from that of the compiler in case of cross-compilation (GOOS).
	GoOS string
	// GoOS is the architecture used during the build of this application; it
	// may differ from that of the compiler in case of cross-compilation (GOARCH).
	GoArch string
	// VersionMajor is the major version of the application.
	VersionMajor = "0"
	// VersionMinor is the minor version of the application.
	VersionMinor = "0"
	// VersionPatch is the patch or revision level of the application.
	VersionPatch = "0"
)

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Time string `json:"time,omitempty"`
	Date string `json:"date,omitempty"`
}

type CompilerInfo

type CompilerInfo struct {
	Version      string `json:"version,omitempty"`
	OS           string `json:"os,omitempty"`
	Architecture string `json:"arch,omitempty"`
}

type DetailedInfo

type DetailedInfo struct {
	Name        string       `json:"name,omitempty"`
	Description string       `json:"description,omitempty"`
	Copyright   string       `json:"copyright,omitempty"`
	Version     VersionInfo  `json:"version,omitempty"`
	Compiler    CompilerInfo `json:"compiler,omitempty"`
	Build       BuildInfo    `json:"build,omitempty"`
	Git         GitInfo      `json:"git,omitempty"`
}

type GitInfo

type GitInfo struct {
	Tag      string `json:"tag,omitempty"`
	Commit   string `json:"commit,omitempty"`
	Time     string `json:"time,omitempty"`
	Modified string `json:"modified,omitempty"`
}

type ShortInfo

type ShortInfo struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Copyright   string `json:"copyright,omitempty"`
	Version     string `json:"version,omitempty"`
}

type Version

type Version struct {
	base.Command
	// Verbose prints extensive information about this application or plugin.
	Verbose bool `short:"v" long:"verbose" description:"Print extensive information about this application."`
}

Version is the command that prints information about the application or plugin to the console; it support both compact and verbose mode.

func (*Version) Execute

func (cmd *Version) Execute(args []string) error

Execute is the real implementation of the Version command.

type VersionInfo

type VersionInfo struct {
	Major string `json:"major,omitempty"`
	Minor string `json:"minor,omitempty"`
	Patch string `json:"patch,omitempty"`
}

func (*VersionInfo) String

func (v *VersionInfo) String() string

Jump to

Keyboard shortcuts

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