Browse Source

preload fix

0x4a52466c696e74 1 month ago
parent
commit
cfb4c13828
1 changed files with 2 additions and 2 deletions
  1. 2 2
      fielder.go

+ 2 - 2
fielder.go

@@ -23,8 +23,8 @@ func FieldFromName(name string) *Field {
 func FieldFromIface(val any) *Field {
 	res := &Field{}
 	if m, check := json.IsMap(val); check {
-		res.Name = strings.TrimSpace(m.String("name", ""))
-		if names := m.Slice("fields", nil); len(names) > 0 {
+		res.Name = strings.TrimSpace(m.String("Name", ""))
+		if names := m.Slice("Fields", nil); len(names) > 0 {
 			res.Names = FieldListFromSlice(names)
 		}
 	} else {