File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11// { {{classname} }} { {{description} }}{ {^description} }the model '{ {{classname} }}'{ {/description} }
2- type { {{classname} }} { {{format } }} { {^format } } { { dataType} } { {/format } }
2+ type { {{classname} }} { {dataType} }
33
44// List of { {{name} }}
55const (
@@ -22,7 +22,7 @@ var Allowed{{{classname}}}EnumValues = []{{{classname}}}{
2222}
2323
2424func (v *{ {{classname} }}) UnmarshalJSON(src []byte) error {
25- var value {{{format } }} { {^format } } { { dataType} } { {/format } }
25+ var value {{dataType} }
2626 err := json.Unmarshal(src, &value)
2727 if err != nil {
2828 return err
@@ -45,7 +45,7 @@ func (v *{{{classname}}}) UnmarshalJSON(src []byte) error {
4545
4646// New{ {{classname} }}FromValue returns a pointer to a valid { {{classname} }}
4747// for the value passed as argument, or an error if the value passed is not allowed by the enum
48- func New{ {{classname} }}FromValue(v { {{format } }} { {^format } } { { dataType} } { {/format } }) (*{ {{classname} }}, error) {
48+ func New{ {{classname} }}FromValue(v { {dataType} }) (*{ {{classname} }}, error) {
4949 ev := {{{classname} }}(v)
5050 if ev.IsValid() {
5151 return &ev, nil
You can’t perform that action at this time.
0 commit comments