Reject a standalone weight on key presence, whatever its value
This commit is contained in:
+1
-1
@@ -144,7 +144,7 @@ func checkTokens(format string, fields map[string]node) error {
|
||||
}
|
||||
if _, ok := fields[name]; !ok {
|
||||
if isOption(name) {
|
||||
return fmt.Errorf("token {%s}: %q is an option, never a field", t.body, name)
|
||||
return fmt.Errorf("token {%s}: %q is an option and can never be a field", t.body, name)
|
||||
}
|
||||
return fmt.Errorf("token {%s}: no field %q", t.body, name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user