Files
config/definition/generate/render/tpl/data/unmarshal_json.go.tpl
andrey f9a0411192
All checks were successful
Go Action / goaction (push) Successful in 29s
def (#12)
Reviewed-on: #12
2025-12-26 14:55:42 +03:00

8 lines
263 B
Smarty

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