apiversion: kmodules.xyz/apiversion Index | Files

package apiversion

import "kmodules.xyz/apiversion"

Index

Package Files

lib.go

func Compare Uses

func Compare(x, y string) (int, error)

Compare returns an integer comparing two version strings. The result will be 0 if x==y, -1 if x < y, and +1 if x > y. An error is returned, if version string can't be parsed.

func MustCompare Uses

func MustCompare(x, y string) int

MustCompare returns an integer comparing two version strings. The result will be 0 if x==y, -1 if x < y, and +1 if x > y.

type InvalidVersion Uses

type InvalidVersion struct {
    // contains filtered or unexported fields
}

func (InvalidVersion) Error Uses

func (e InvalidVersion) Error() string

type Version Uses

type Version struct {
    X   int
    Y   string
    Z   int
}

func NewVersion Uses

func NewVersion(s string) (*Version, error)

func (Version) Compare Uses

func (v Version) Compare(other Version) int

Compare returns an integer comparing two version strings. The result will be 0 if v==other, -1 if v < other, and +1 if v > other.

Package apiversion imports 3 packages (graph) and is imported by 1 packages. Updated 2020-09-28. Refresh now. Tools for package owners.