goversion

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MinSupportedVersionOfGoMajor = 1
	MinSupportedVersionOfGoMinor = 21
	MaxSupportedVersionOfGoMajor = 1
	MaxSupportedVersionOfGoMinor = 23
)
View Source
var (
	GoVer18Beta = GoVersion{1, 8, betaRev(0), "", ""}
)

Functions

func Compatible

func Compatible(producer string, warnonly bool) error

Compatible checks that the version specified in the producer string is compatible with this version of delve.

func ProducerAfterOrEqual

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

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.

func VersionAfterOrEqualRev

func VersionAfterOrEqualRev(version string, major, minor, rev int) bool

VersionAfterOrEqualRev 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 // revision number or negative number for beta and rc releases
	Proposal  string
	Toolchain 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 ParseProducer

func ParseProducer(producer string) GoVersion

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.

func (*GoVersion) String

func (v *GoVersion) String() string

Jump to

Keyboard shortcuts

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