You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
units/units.go
Line 47 in 93725cf
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:
and return (string,string,error) from the parse function.
The text was updated successfully, but these errors were encountered: