go-semver: github.com/ktr0731/go-semver Index | Files

package semver

import "github.com/ktr0731/go-semver"

Index

Package Files

semver.go

Constants

const (
    VersionTypeMajor = iota
    VersionTypeMinor
    VersionTypePatch
)

type Version Uses

type Version struct {
    Major, Minor, Patch int
    // contains filtered or unexported fields
}

func MustParse Uses

func MustParse(in string) *Version

func Parse Uses

func Parse(in string) *Version

Parse parses passed string as a semantic version if parsing will be failed, its error is stored to *Version.Error()

func (*Version) Bump Uses

func (v *Version) Bump(typ VersionType)

func (*Version) Compare Uses

func (v *Version) Compare(v2 *Version) int

func (*Version) Equal Uses

func (v *Version) Equal(v2 *Version) bool

func (*Version) Error Uses

func (v *Version) Error() error

func (*Version) GreaterThan Uses

func (v *Version) GreaterThan(v2 *Version) bool

func (*Version) LessThan Uses

func (v *Version) LessThan(v2 *Version) bool

func (*Version) String Uses

func (v *Version) String() string

type VersionType Uses

type VersionType int

Package semver imports 4 packages (graph) and is imported by 7 packages. Updated 2018-07-25. Refresh now. Tools for package owners.