clarify comment about empty map suppression

Signed-off-by: SunilKotte <sunilkotte0909@gmail.com>
pull/32176/head
SunilKotte 1 month ago
parent 91845fea2a
commit d16d503e07

@ -350,7 +350,8 @@ func coalesceTablesFullKey(printf printFn, dst, src map[string]any, prefix strin
printf("warning: cannot overwrite table with non table for %s (%v)", fullkey, val)
}
} else if istable(dv) && val != nil {
// Only warn if the value is a nonempty map, otherwise skip silently
// Suppress warning when user supplies an empty map (nil-like);
// still warn for non-map values and non-empty maps.
if m, ok := val.(map[string]any); !ok || len(m) > 0 {
printf("warning: destination for %s is a table. Ignoring non-table value (%v)", fullkey, val)
}

Loading…
Cancel
Save