Remiplement Add to use reflection.
Now it matters whether `FieldLabel`s are spelled correctly, but in return, we don't have to write and maintain that obnoxious `switch` statement.
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
var (
|
||||
ErrOptionNotEnabled = errors.New("option not enabled")
|
||||
ErrPolicyNotEnacted = errors.New("cannot unenact policy that is not enacted")
|
||||
ErrNoFieldLabel = errors.New("field does not exist")
|
||||
|
||||
// ErrUnimplemented and ErrKeepMessaage are "non-errors". They are used
|
||||
// as special signals that the result needs to be handled in a special way;
|
||||
|
Reference in New Issue
Block a user