Skip to content

Commit b1a8731

Browse files
lvan100lianghuan
authored andcommitted
111
1 parent 9e71c42 commit b1a8731

File tree

3 files changed

+0
-1090
lines changed

3 files changed

+0
-1090
lines changed

gen/generator/golang/type.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -144,31 +144,6 @@ const {{$c.Name}} {{$c.Type}} = {{$c.Value}}
144144
return New{{$s.Name}}()
145145
}
146146
147-
{{range $f := $s.Fields}}
148-
// Get{{$f.Name}} returns the value of {{$f.Name}}
149-
func (x *{{$s.Name}}) Get{{$f.Name}}() (r {{$f.Type}}) {
150-
if x != nil {
151-
return x.{{$f.Name}}
152-
}
153-
return r
154-
}
155-
156-
// Set{{$f.Name}} sets the value of {{$f.Name}}
157-
{{- if or (OptionalBaseType $f.TypeKind) (OptionalEnumType $f.TypeKind)}}
158-
func (x *{{$s.Name}}) Set{{$f.Name}}(v {{TrimPrefix $f.Type "*"}}) {
159-
if x != nil {
160-
x.{{$f.Name}} = &v
161-
}
162-
}
163-
{{- else}}
164-
func (x *{{$s.Name}}) Set{{$f.Name}}(v {{$f.Type}}) {
165-
if x != nil {
166-
x.{{$f.Name}} = v
167-
}
168-
}
169-
{{- end}}
170-
{{end}}
171-
172147
// Binding extracts non-body values (header, path, query) from *http.Request
173148
func (x *{{$s.Name}}) Binding(r *http.Request) error {
174149
{{- if $s.BindingCount}}

0 commit comments

Comments
 (0)