Docblocks, a handful of tests, but not enough

This commit is contained in:
Philipp Heckel 2021-12-19 14:27:26 -05:00
parent fa9d6444f5
commit e3dfea1991
9 changed files with 121 additions and 12 deletions

View file

@ -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":