Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Version ¶
type Version struct {
// alignment info
AlignIndex int // index of the "first point in the version" within the field.Encoded string
// version info
Numbers []int // Major, Minor, Patch integer values
Label string // e.g. alpha, beta, rc0, rc1, etc
Metadata []string // darwin, linux, amd64, stripped etc
// contains filtered or unexported fields
}
Version represents a single SemVer version, used for sorting and alignment.
Version structs are only intended for use for rendering, in [field.Field] structs.
A semver version consists of
- a major version number
- a minor version number (optional)
- a patch number (optional)
- a single label (optional, e.g. "-alpha", "-dev")
- any number of meta data tags (optional, e.g. "+linux+amd64+stripped")
See also: [number.Number]
func FromString ¶
Click to show internal directories.
Click to hide internal directories.