Documentation
¶
Index ¶
- Variables
- type Semver
- func (v *Semver) AppendBytes(dst []byte) []byte
- func (v *Semver) Bytes() []byte
- func (v *Semver) Major() uint64
- func (v *Semver) MarshalBinary() ([]byte, error)
- func (v *Semver) MarshalText() (text []byte, err error)
- func (v *Semver) Meta() []byte
- func (v *Semver) MetaString() string
- func (v *Semver) Minor() uint64
- func (v *Semver) Parse(ver []byte) error
- func (v *Semver) ParseString(ver string) error
- func (v *Semver) Patch() uint64
- func (v *Semver) PreRelease() []byte
- func (v *Semver) PreReleaseString() string
- func (v *Semver) Reset()
- func (v *Semver) SetMajor(value uint64) *Semver
- func (v *Semver) SetMeta(value []byte) *Semver
- func (v *Semver) SetMetaString(value string) *Semver
- func (v *Semver) SetMinor(value uint64) *Semver
- func (v *Semver) SetPatch(value uint64) *Semver
- func (v *Semver) SetPreRelease(value []byte) *Semver
- func (v *Semver) SetPreReleaseString(value string) *Semver
- func (v *Semver) String() string
- func (v *Semver) UnmarshalBinary(data []byte) error
- func (v *Semver) UnmarshalText(text []byte) error
- func (v *Semver) WriteBinaryTo(w io.Writer) (int64, error)
- func (v *Semver) WriteTo(w io.Writer) (int64, error)
- type Version
- type Version32
- func (v *Version32) AppendBytes(dst []byte) []byte
- func (v *Version32) Bytes() (r []byte)
- func (v *Version32) Major() uint8
- func (v *Version32) MarshalBinary() ([]byte, error)
- func (v *Version32) MarshalText() ([]byte, error)
- func (v *Version32) Minor() uint8
- func (v *Version32) Parse(ver []byte) error
- func (v *Version32) ParseString(ver string) error
- func (v *Version32) Patch() uint8
- func (v *Version32) Reset()
- func (v *Version32) Revision() uint8
- func (v *Version32) SetMajor(value uint8) *Version32
- func (v *Version32) SetMinor(value uint8) *Version32
- func (v *Version32) SetPatch(value uint8) *Version32
- func (v *Version32) SetRevision(value uint8) *Version32
- func (v *Version32) String() string
- func (v *Version32) UnmarshalBinary(bin []byte) error
- func (v *Version32) UnmarshalText(p []byte) error
- func (v *Version32) WriteBinaryTo(w io.Writer) (int64, error)
- func (v *Version32) WriteTo(w io.Writer) (int64, error)
- type Version64
- func (v *Version64) AppendBytes(dst []byte) []byte
- func (v *Version64) Bytes() (r []byte)
- func (v *Version64) Major() uint16
- func (v *Version64) MarshalBinary() ([]byte, error)
- func (v *Version64) MarshalText() ([]byte, error)
- func (v *Version64) Minor() uint16
- func (v *Version64) Parse(ver []byte) error
- func (v *Version64) ParseString(ver string) error
- func (v *Version64) Patch() uint16
- func (v *Version64) Reset()
- func (v *Version64) Revision() uint16
- func (v *Version64) SetMajor(value uint16) *Version64
- func (v *Version64) SetMinor(value uint16) *Version64
- func (v *Version64) SetPatch(value uint16) *Version64
- func (v *Version64) SetRevision(value uint16) *Version64
- func (v *Version64) String() string
- func (v *Version64) UnmarshalBinary(bin []byte) error
- func (v *Version64) UnmarshalText(p []byte) error
- func (v *Version64) WriteBinaryTo(w io.Writer) (int64, error)
- func (v *Version64) WriteTo(w io.Writer) (int64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmpty = errors.New("empty version") ErrShort = errors.New("data is too short") ErrBinLen8 = errors.New("binary data length less than 8 bytes") )
View Source
var ( ErrEmptySemver = errors.New("version is empty") ErrBadSemver = errors.New("wrong semver format") )
Functions ¶
This section is empty.
Types ¶
type Semver ¶
type Semver struct {
// contains filtered or unexported fields
}
func ParseSemver ¶
ParseSemver makes new version from source.
func ParseSemverString ¶
ParseSemverString makes new version from source string.
func (*Semver) AppendBytes ¶
func (*Semver) MarshalBinary ¶
func (*Semver) MarshalText ¶
func (*Semver) MetaString ¶
func (*Semver) ParseString ¶
func (*Semver) PreRelease ¶
func (*Semver) PreReleaseString ¶
func (*Semver) SetMetaString ¶
func (*Semver) SetPreRelease ¶
func (*Semver) SetPreReleaseString ¶
func (*Semver) UnmarshalBinary ¶
func (*Semver) UnmarshalText ¶
type Version ¶
type Version interface {
fmt.Stringer
io.WriterTo
encoding.BinaryMarshaler
encoding.BinaryUnmarshaler
encoding.TextMarshaler
encoding.TextUnmarshaler
Parse(ver []byte) error
ParseString(ver string) error
WriteBinaryTo(w io.Writer) (int64, error)
Bytes() []byte
AppendBytes(dst []byte) []byte
Reset()
}
type Version32 ¶
type Version32 uint32
Version32 represents simple version based on uint32 type.
func NewCompact32 ¶
NewCompact32 composes version from given parts.
func ParseVersion32 ¶
ParseVersion32 makes new version from source.
func ParseVersion32String ¶
ParseVersion32String makes new version from source string.
func (*Version32) AppendBytes ¶
func (*Version32) MarshalBinary ¶
func (*Version32) MarshalText ¶
func (*Version32) ParseString ¶
func (*Version32) SetRevision ¶
func (*Version32) UnmarshalBinary ¶
func (*Version32) UnmarshalText ¶
type Version64 ¶
type Version64 uint64
Version64 represents simple version based on uint64 type.
func NewCompact64 ¶
NewCompact64 composes version from given parts.
func ParseVersion64 ¶
ParseVersion64 makes new version from source.
func ParseVersion64String ¶
ParseVersion64String makes new version from source string.
func (*Version64) AppendBytes ¶
func (*Version64) MarshalBinary ¶
func (*Version64) MarshalText ¶
func (*Version64) ParseString ¶
func (*Version64) SetRevision ¶
func (*Version64) UnmarshalBinary ¶
func (*Version64) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.