semver

package
v3.0.0-...-b0a9388 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 23

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) GreaterThan

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

func (*Semver) LessThan

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

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

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