...

Package version

import "github.com/bazelbuild/bazel-gazelle/internal/version"
Overview
Index

Overview ▾

type Version

Version is a tuple of non-negative integers that represents the version of a software package.

type Version []int

func ParseVersion

func ParseVersion(vs string) (Version, error)

ParseVersion parses a version of the form "12.34.56-abcd". Non-negative integer components are separated by dots. An arbitrary suffix may appear after '-', which is ignored.

func (Version) Compare

func (x Version) Compare(y Version) int

Compare returns an integer comparing two versions lexicographically.

func (Version) String

func (v Version) String() string