-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Line 47 in 93725cf
| for _, unitRegex := range HintedRegex[""] { |
If there are no hints, and if more than one regexes match, then it is ambiguous, and you should return the names of both matching regexes. To accommodate, define an error type:
type ErrAmbiguousUnit []string
func (e ErrAmbigousUnit) Error() string {
return "Ambiguous unit:"+strings.Join([]string(e),", ")
}
and return (string,string,error) from the parse function.
Metadata
Metadata
Assignees
Labels
No labels