goversion

package
v0.0.0-...-52d6a69 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GoVer18Beta = GoVersion{1, 8, -1, 0, 0, ""}
)

Functions

This section is empty.

Types

type GoVersion

type GoVersion struct {
	Major    int
	Minor    int
	Rev      int
	Beta     int
	RC       int
	Proposal string
}

GoVersion represents the Go version of the Go compiler version used to compile the target binary.

func Installed

func Installed() (GoVersion, bool)

Installed runs "go verison" and parses the output

func Parse

func Parse(ver string) (GoVersion, bool)

Parse parses a go verison string

func (*GoVersion) AfterOrEqual

func (v *GoVersion) AfterOrEqual(b GoVersion) bool

AfterOrEqual returns whether one GoVersion is after or equal to the other.

func (*GoVersion) IsDevel

func (v *GoVersion) IsDevel() bool

IsDevel returns whether the GoVersion is a development version.

Jump to

Keyboard shortcuts

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