Documentation ¶
Overview ¶
Package semver provides shared utilities for manipulating Go semantic versions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsSemver ¶
ContainsSemver checks if semver version v is in the range encoded by ar. If ar is not a semver range, returns false. A range is interpreted as a left-closed and right-open interval.
Assumes that
- exactly one of Introduced or Fixed fields is set
- ranges in ar are not overlapping
- beginning of time is encoded with .Introduced="0"
- no-fix is not an event, as opposed to being an event where Introduced="" and Fixed=""
func GoTagToSemver ¶
This is a modified copy of pkgsite/internal/stdlib:VersionForTag.
func Less ¶
Less returns whether v1 < v2, where v1 and v2 are semver versions with either a "v", "go" or no prefix.
func NonSupersededFix ¶
NonSupersededFix returns a fixed version from ranges that is not superseded by any other fix or any other introduction of a vulnerability. Returns "" in case there is no such fixed version.
Types ¶
This section is empty.