package
0.2.0
Repository: https://github.com/roytangrb/gitwok.git
Documentation: pkg.go.dev

# Functions

ContainsNewline check if string contains newline chars.
ContainsWhiteSpace check if string contains whitesapces.
Execute adds all child commands to the root command and sets flags appropriately.
GitAdd exec `git add <filepath>`.
GitAddAll exec `git add .`.
GitCommit exec `git commit -m`.
GitRm exec `git rm` to stage changes of a deleted file.
IsBrkChnFooter check if token is breaking change footer token.
MatchFooters takes raw footers input string and return string slice of found footers.
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.
TrimFooter separator space should not be trimed if no footer value Whitespace trimmed value may contains leading "#" or trailing ":", treat it as intention to mean a separator, add the space back.

# Constants

CodeAddedNotStaged added not staged.
CodeCopiedNotStaged copied in work tree not staged not common, TODO: verify usage.
CodeDeletedNotStaged deleted not staged.
CodeModifiedNotStaged modified not staged.
CodeRenamedNotStaged renamed in work tree not staged not common, `git rename` will automatically stage the changes.
CodeUntracked untracked.
CommitMsgTmpl template for building commit message.
FSepColonSpace footer separator.
FSepSpaceSharp footer separator.
FTokenBrkChange special footer token.
FTokenBrkChangeAlias FTokenBrkChange alias.
GitExec git executable name.
InvalidBrkChnFTSep error msg of invalid breaking change footer separator.
InvalidDesc error msg of invalid description.
InvalidFooter error msg of invalid footer.
InvalidFooterToken error msg of invalid footer.
InvalidScope error msg of invalid scope.
InvalidType error msg of invalid type.
PathSepArrow path separator if file is moved or copied.
RequiredBrkChnFTDesc error msg of missing breaking footer description.
RequiredDesc error msg of missing description.
RequiredType error msg of missing type.
VersionTmpl version template for --version output.

# Variables

FootersQuestions ask footers input separately to handle custom parse logic.
PresetCommitTypes conventional commits suggested types.
UnstagedShortCodes git status --short output XY code of not staged files.

# Structs

CommitFooters helper struct for separate survey with custom Setter.
CommitMsg properties.