Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorNameLen = "value name must be 3 - 20 characters long" ErrorNameChars = "value name must be only latin lowercase characters or -_" ErrorRegexpEnds = "must contain start `^` and end `$` for full line validation" NameMinLen = 3 NameMaxLen = 20 ErrorValueEmpty = "regexp or allowed must be filled" ErrorValueBoth = "regexp and allowed can't be filled together" Regexp = "regexp" ValuesConfigKey = "commit.values" TitleValue = "title" TypeValue = "type" ContextValue = "context" IssueValue = "issue" )
Variables ¶
View Source
var ( NameRegex = regexp.MustCompile("^[a-z-_]+$") DefaultProperties = Properties{ TypeValue: { Allowed: map[string]struct{}{ "fix": {}, "feat": {}, }, }, ContextValue: { Regexp: regexp.MustCompile("^[a-z-_]+$"), MaxLen: 10, }, TitleValue: { Regexp: regexp.MustCompile(`^[\w ]+$`), MaxLen: 50, }, IssueValue: { Regexp: regexp.MustCompile(`^#\d+$`), MaxLen: 5, }, } )
Functions ¶
This section is empty.
Types ¶
type Properties ¶
Click to show internal directories.
Click to hide internal directories.