Documentation
¶
Overview ¶
Package taskid is the grammar of a task id: a prefix of letters and digits, a dash, a number. Every reader builds its pattern from these fragments, so they differ only where their input does.
Index ¶
Constants ¶
const ( Typed = `[A-Za-z][A-Za-z0-9]*` Word = `(?:[A-Za-z]+|[A-Z][A-Z0-9]*)` Declared = `[A-Z][A-Z0-9]{1,9}` )
The prefix as three readers see it. Typed is what a user types as a reference, any case. Word is the first word of a skill argument, where a prefix holding a digit counts only upper-case, so `x86-64` opening a description stays a description. Declared is the format a project declares and `f10 init` writes back, upper-case and two to ten long.
const Reference = `(?:(` + Typed + `)-)?#?(\d+)`
Reference is a typed task reference: a bare number, `#123`, or a prefixed id in any case, the prefix and the number captured.
Variables ¶
This section is empty.
Functions ¶
func RequestNumber ¶
RequestNumber reads a PR or MR number as a host writes it (#12, !12) or bare (12); anything else, `none` included, is 0.
func ValidPrefix ¶
ValidPrefix reports a prefix a project may declare.
Types ¶
This section is empty.