Documentation ¶
Index ¶
- func Valid(ver string) bool
- type Version
- func (v1 *Version) Compare(v2 Version) int
- func (v1 *Version) Epoch() int
- func (v1 *Version) Equal(v2 Version) bool
- func (v1 *Version) GreaterThan(v2 Version) bool
- func (v1 *Version) LessThan(v2 Version) bool
- func (v1 *Version) Revision() string
- func (v1 *Version) String() string
- func (v1 *Version) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version represents a package version (http://man.he.net/man5/deb-version).
func NewVersion ¶
NewVersion returns a parsed version
func (*Version) Compare ¶
Compare returns an integer comparing two version according to deb-version. The result will be 0 if v1==v2, -1 if v1 < v2, and +1 if v1 > v2.
func (*Version) GreaterThan ¶
GreaterThan returns whether this version is greater than another version.
Click to show internal directories.
Click to hide internal directories.