Documentation
¶
Index ¶
- type Version
- func (version Version) Equal(comparand Version) bool
- func (version Version) Larger(comparand Version) bool
- func (version Version) MarshalJSON() ([]byte, error)
- func (version Version) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
- func (version *Version) Parse(text string) error
- func (version Version) Smaller(comparand Version) bool
- func (version Version) SpecificString(numberOfComponents int) string
- func (version Version) String() string
- func (version *Version) UnmarshalJSON(data []byte) error
- func (version *Version) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct { Major uint `json:"major"` Minor uint `json:"minor"` Revision uint `json:"revision"` Build uint `json:"build"` }
Version defines a structure describing the version of a program or module.
func ParseVersion ¶
ParseVersion tries to read all available parts of a version string
func (Version) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface
func (Version) MarshalXML ¶
MarshalXML satisfies the xml.Marshaler interface
func (*Version) Parse ¶
Parse tries to read all available parts of a version string to the internal variables
func (Version) SpecificString ¶
SpecificString converts a Version into its string representation with either the specified number of components ([1,4]) or its generic string representation
func (*Version) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface
func (*Version) UnmarshalXML ¶
UnmarshalXML satisfies the xml.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.