rc: In options/info make FieldName contain a "." if it should be nested

Before this would have Output "FieldName": "ListenAddr" where it
actually needs to be set in a sub object "HTTP".

After this fix it outputs "FieldName": "HTTP.ListenAddr" to indicate
"ListenAddr" needs to be set in the object "HTTP".
This commit is contained in:
Nick Craig-Wood
2025-03-28 16:06:50 +00:00
parent b1456835d8
commit cf571ad661
3 changed files with 13 additions and 12 deletions

View File

@ -139,6 +139,7 @@ func Items(opt any) (items []Item, err error) {
if hasTag {
newItem.Name = configName + "_" + newItem.Name
}
newItem.Field = fieldName + "." + newItem.Field
items = append(items, newItem)
}
} else {