version

package
v0.0.0-...-2bbe97e Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version represents the semantic version of Sledgehammer
	Version string = "0.0.1"
	// BuildDate represents the date of the build
	BuildDate string
	// GitCommit represent the git sha of the current build
	GitCommit string
	// DefaultConstraint is the constraint used for version selection when none is given
	DefaultConstraint = "*"
)

Functions

func Has

func Has(versions []string, version string) bool

Has will check if a list of versions contain the given version

func Merge

func Merge(a []string, b []string) []string

Merge will return a merged sorted list of the two lists a and b

func Select

func Select(versions []string, constraint string) string

Select will select one of the given versions based on the given constraint. If no version can be found, it will return an empty string

func ShouldPull

func ShouldPull(local string, remote string) bool

ShouldPull will determine if the remote version should be pulled. It will be pulled if the remote version is newer than the local one.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳