Docblocks, a handful of tests, but not enough
This commit is contained in:
parent
fa9d6444f5
commit
e3dfea1991
9 changed files with 121 additions and 12 deletions
|
@ -80,8 +80,9 @@ func DurationToHuman(d time.Duration) (str string) {
|
|||
return
|
||||
}
|
||||
|
||||
// ParsePriority parses a priority string into its equivalent integer value
|
||||
func ParsePriority(priority string) (int, error) {
|
||||
switch strings.ToLower(priority) {
|
||||
switch strings.TrimSpace(strings.ToLower(priority)) {
|
||||
case "":
|
||||
return 0, nil
|
||||
case "1", "min":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue