Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RequiredType error msg of missing type RequiredType = "commit type is required" // RequiredDesc error msg of missing description RequiredDesc = "commit description is required" // InvalidType error msg of invalid type InvalidType = "commit type is invalid" // InvalidScope error msg of invalid scope InvalidScope = "commit scope is invalid" // InvalidDesc error msg of invalid description InvalidDesc = "commit description is invalid" // InvalidBrkChnFTSep error msg of invalid breaking change footer separator InvalidBrkChnFTSep = "breaking change footer separator is invalid" // RequiredBrkChnFTDesc error msg of missing breaking footer description RequiredBrkChnFTDesc = "breaking change footer description is required" InvalidFooter = "commit footer is invalid" InvalidFooterToken = "commit footer token is invalid" // FTokenBrkChange special footer token FTokenBrkChange = "BREAKING CHANGE" // FTokenBrkChangeAlias FTokenBrkChange alias FTokenBrkChangeAlias = "BREAKING-CHANGE" // FSepColonSpace footer separator FSepColonSpace = ": " // FSepSpaceSharp footer separator FSepSpaceSharp = " #" )
View Source
const GitExec = "git"
GitExec git executable name
Variables ¶
This section is empty.
Functions ¶
func ContainsNewline ¶
ContainsNewline check if string contains newline chars
func ContainsWhiteSpace ¶
ContainsWhiteSpace check if string contains whitesapces
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func IsBrkChnFooter ¶
IsBrkChnFooter check if token is breaking change footer token
func ParseFooter ¶
ParseFooter return components of a commit msg footer if seperable by ": " or " #" @param f footer without no newlines @return token "" if separated wrongly @return sep "" if separated wrongly @return val "" if separated wrongly
Types ¶
type CommitMsg ¶
type CommitMsg struct { Type string // required, preset or config values only Scope string // optional HasBrkChange bool // optional, default false Description string // required, no line break Body string // optional, allow line breaks }
CommitMsg properties
Click to show internal directories.
Click to hide internal directories.