Help us shape the future of Go! Take the 2026 Go Developer Survey

versions

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Overview

Package versions contains functions to parse and sort Bazel version identifier.

Index

Constants

View Source
const (
	// BazelUpstream contains the name of the official Bazel GitHub organization.
	BazelUpstream = "bazelbuild"
)

Variables

This section is empty.

Functions

func GetInAscendingOrder

func GetInAscendingOrder(versions []string) []string

GetInAscendingOrder returns the given versions sorted in ascending order.

func IsCommit added in v1.14.1

func IsCommit(version string) bool

IsCommit returns whether the given version refers to a commit, including last_green.

func MatchCommitPattern added in v1.22.0

func MatchCommitPattern(version string) bool

MatchCommitPattern returns whether the given version refers to a commit, not including last_green.

Types

type Info

type Info struct {
	MustBeRelease, MustBeCandidate bool
	IsLTS, IsRolling               bool
	IsCommit, IsFork, IsRelative   bool
	Fork, Value                    string
	LatestOffset, TrackRestriction int
}

Info represents a structured Bazel version identifier.

func Parse

func Parse(fork, version string) (*Info, error)

Parse extracts and returns structured information about the given Bazel version label.

Jump to

Keyboard shortcuts

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