Insensitive case for allow-empty value.
This commit is contained in:
parent
2e20394af4
commit
ee0e014617
2 changed files with 28 additions and 1 deletions
|
@ -52,7 +52,7 @@ func addMetadata(rootType reflect.Type, node *Node) error {
|
|||
return fmt.Errorf("node %s (type %s) must have children", node.Name, fType)
|
||||
}
|
||||
|
||||
node.Disabled = len(node.Value) > 0 && node.Value != "true" && field.Tag.Get(TagLabel) == "allowEmpty"
|
||||
node.Disabled = len(node.Value) > 0 && !strings.EqualFold(node.Value, "true") && field.Tag.Get(TagLabel) == "allowEmpty"
|
||||
}
|
||||
|
||||
if len(node.Children) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue