goversion

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: 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

func ProducerAfterOrEqual added in v1.1.0

func ProducerAfterOrEqual(producer string, major, minor int) bool

ProducerAfterOrEqual checks that the DW_AT_producer version is major.minor or a later version, or a development version.

func VersionAfterOrEqual added in v1.1.0

func VersionAfterOrEqual(version string, major, minor int) bool

VersionAfterOrEqual checks that version (as returned by runtime.Version() or go version) is major.minor or a later version, or a development version.

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 version" and parses the output

func Parse

func Parse(ver string) (GoVersion, bool)

Parse parses a go version 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