(field reflect.StructField)
| 365 | value := field.Tag.Get(key) |
| 366 | if value == "" { |
| 367 | return nil |
| 368 | } |
| 369 | var decoded any |
| 370 | if err := json.Unmarshal([]byte(value), &decoded); err != nil { |
| 371 | panic(err) |
| 372 | } |
| 373 | return decoded |
| 374 | } |
| 375 | |
| 376 | func jsonFieldName(field reflect.StructField) string { |
| 377 | tag := field.Tag.Get("json") |
| 378 | if tag == "" { |
| 379 | return "" |
| 380 | } |
no outgoing calls
no test coverage detected