Files
config/definition/generate/render/tpl/data/unmarshal_json.go.tpl
andrey 8d15b51248
All checks were successful
Go Action / goaction (pull_request) Successful in 4m52s
add generate heper config
2025-12-29 22:19:11 +03:00

9 lines
266 B
Smarty

{{block "UnmarshalJSON" . -}}
pval, perr := {{.ValName}}.ParseString()
if perr != nil {
return {{.Value}}, fmt.Errorf("parse [%v]:%w", []string{ {{- .Keys "i" -}} }, perr)
}
return {{.Value}}, {{.Value}}.UnmarshalJSON([]byte(pval))
{{- end -}}