vendor latest c/common

Includes my pasta changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-08-28 13:31:49 +02:00
parent 2be86b72af
commit 2f858675b3
23 changed files with 212 additions and 101 deletions

View File

@@ -101,7 +101,7 @@ func Headers(object any, overrides map[string]string) []map[string]string {
// Column header will be field name upper-cased.
headers := make(map[string]string, value.NumField())
for i := 0; i < value.Type().NumField(); i++ {
for i := range value.Type().NumField() {
field := value.Type().Field(i)
// Recurse to find field names from promoted structs
if field.Type.Kind() == reflect.Struct && field.Anonymous {