Documentation ¶
Index ¶
Constants ¶
View Source
const Major = VersionType("major")
View Source
const Minor = VersionType("minor")
View Source
const Patch = VersionType("patch")
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Version ¶
func BumpInFile ¶
func BumpInFile(vtype VersionType, filename string) (*Version, error)
BumpInFile finds a constant named VERSION, version, or Version in the file with the given filename, increments the version per the given VersionType, and writes the file back to disk. Returns the incremented Version object.
func Parse ¶
ParseVersion parses a version string of the forms "2", "2.3", or "0.10.11". Any information after the third number ("2.0.0-beta") is discarded. Very little effort is taken to validate the input.
If a field is omitted from the string version (e.g. "0.2"), it's stored in the Version string as the integer -1.
type VersionType ¶
type VersionType string
Click to show internal directories.
Click to hide internal directories.