semver

package
v2.19.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Semver

type Semver string

Semver is a type that encapsulates github.com/Masterminds/semver/v3.Version struct so it can be used in our API

func NewSemver

func NewSemver(ver string) (*Semver, error)

NewSemver creates new Semver version struct and returns pointer to it

func NewSemverOrDie

func NewSemverOrDie(ver string) *Semver

NewSemverOrDie behaves similar to NewVersion, i.e. it creates new Semver version struct, but panics if an error happens

func (Semver) DeepCopy

func (s Semver) DeepCopy() Semver

func (*Semver) DeepCopyInto

func (in *Semver) DeepCopyInto(out *Semver)

func (*Semver) Equal

func (s *Semver) Equal(b *Semver) bool

Equal compares two version structs by comparing Semver values

func (*Semver) MajorMinor

func (s *Semver) MajorMinor() string

MajorMinor returns a string like "Major.Minor"

func (*Semver) Semver

func (s *Semver) Semver() *semverlib.Version

Semver returns github.com/Masterminds/semver/v3 struct. In case when Semver is nil, nil will be returned. In case of parsing error, nil will be returned

func (*Semver) Set added in v2.17.0

func (s *Semver) Set(ver string) error

Set initializes semver struct and sets version

func (*Semver) String

func (s *Semver) String() string

String returns string representation of Semver version

Jump to

Keyboard shortcuts

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