version

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 8 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormatedVersion

type FormatedVersion struct {
	Version string `json:"version" yaml:"version"`
}

FormatedVersion Entity

type OutputFormat

type OutputFormat int

OutputFormat Version output format enum

const (
	JSON OutputFormat = iota
	Yaml
)

Version Output format enum definition

type Version

type Version struct {
	Name    string
	Author  string
	License string
	Major   int
	Minor   int
	Build   int
	Rev     int
}

Version Entity

func FromFile added in v0.0.22

func FromFile(filePath string) (*Version, error)

func FromString added in v0.0.22

func FromString(ver string) (*Version, error)

func Get

func Get(v ...int) *Version

Get Creates a new Version for the application

func (*Version) PrintAnsiHeader

func (v *Version) PrintAnsiHeader()

PrintAnsiHeader Prints a Application Version Ansi Header

func (*Version) PrintHeader

func (v *Version) PrintHeader()

PrintHeader Prints an Application Version simple text header

func (*Version) PrintVersion

func (v *Version) PrintVersion(format int) interface{}

PrintVersion Prints the application version in the desired format

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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