Documentation ¶
Overview ¶
version is a pure-go implementation of dpkg version string functions (parsing, comparison) which is compatible with dpkg(1).
Index ¶
- func Compare(a Version, b Version) int
- type Slice
- type Version
- func (v *Version) Empty() bool
- func (v *Version) IsNative() bool
- func (version Version) MarshalControl() (string, error)
- func (version *Version) MarshalText() ([]byte, error)
- func (v Version) String() string
- func (v Version) StringWithoutEpoch() string
- func (version *Version) UnmarshalControl(data string) error
- func (version *Version) UnmarshalText(text []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Version ¶
func Parse ¶
Parse returns a Version struct filled with the epoch, version and revision specified in input. It verifies the version string as a whole, just like dpkg(1), and even returns roughly the same error messages.
func (Version) MarshalControl ¶
func (*Version) MarshalText ¶ added in v0.13.0
func (Version) StringWithoutEpoch ¶ added in v0.15.0
func (*Version) UnmarshalControl ¶
func (*Version) UnmarshalText ¶ added in v0.13.0
Click to show internal directories.
Click to hide internal directories.