Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SemverBump = map[UPDATE_SEMVER]func(*semver.Version){ PATCH: func(v *semver.Version) { v.BumpPatch() }, MINOR: func(v *semver.Version) { v.BumpMinor() }, MAJOR: func(v *semver.Version) { v.BumpMajor() }, }
SemverBump a hashmap containing update functions for semver
Functions ¶
func GetVersion ¶
GetVersion retrieves the version number from a string
func IsVersionNo ¶
IsVersionNo checks if a string contains npm like version string
func ProcessVersionLine ¶
func ProcessVersionLine(line string, update UPDATE_SEMVER) string
func ReplaceVersion ¶
ReplaceVersion replaces the verion of within a string input: "version": "1.1.1" ", "2.0.0" output: "version": "2.00"
Types ¶
type Resouces ¶
type Resouces struct { TargetFile string Update UPDATE_SEMVER }
type UPDATE_SEMVER ¶
type UPDATE_SEMVER string
const ( PATCH UPDATE_SEMVER = "PATCH" MINOR UPDATE_SEMVER = "MINOR" MAJOR UPDATE_SEMVER = "MAJOR" )
Click to show internal directories.
Click to hide internal directories.