Semver

package
v0.0.0-...-be7a3bd Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Alpha = iota
	Beta
	RC
	Release
)

Variables

View Source
var PreReleaseNames = []string{"alpha", "beta", "rc", "release"}

Functions

This section is empty.

Types

type Version

type Version struct {
	Major           int    `json:"major"`
	Minor           int    `json:"minor"`
	Patch           int    `json:"patch"`
	PreRelease      int    `json:"pre_release"`
	PreReleaseCount int    `json:"pre_release_count"`
	BuildMetadata   string `json:"build_metadata"`
}

func NewFromString

func NewFromString(str string) (*Version, error)

func (*Version) Cmp

func (v *Version) Cmp(nv *Version) int

func (*Version) String

func (v *Version) String() string

语义化版本号string

func (*Version) TagString

func (v *Version) TagString() string

TagString 语义化版本标签

type VersionString

type VersionString string

Jump to

Keyboard shortcuts

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