semverlike

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package semverlike provides functionality to parse and compare version strings that are similar to semantic versioning, but with more flexibility. It is currently used to parse go mod versions to determine if a patch version exists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Components

type Components []*big.Int

Components are individual components of each semver segment.

func (*Components) Cmp

func (components *Components) Cmp(b Components) int

func (*Components) Fetch

func (components *Components) Fetch(n int) *big.Int

type Version

type Version struct {
	LeadingV   bool
	Components Components
	Build      string
	Original   string
}

Version is a version that is _like_ a version as defined by the Semantic Version specification, except with potentially unlimited numeric components and a leading "v"

func ParseSemverLikeVersion

func ParseSemverLikeVersion(line string, maxComponents int) Version

Jump to

Keyboard shortcuts

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