Skip to content

Commit 2492270

Browse files
tchsskRaphaël Simon
authored and
Raphaël Simon
committed
Fix gen_clinet to suppress blank lines (goadesign#737)
1 parent 398e76a commit 2492270

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

goagen/gen_client/generator.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,7 @@ func (c *Client) {{ $funcName }}(ctx context.Context, path string{{ if .Params }
984984
{{ if .HasPayload }} if contentType != "*/*" {
985985
header.Set("Content-Type", contentType)
986986
}
987-
{{ end }}{{ range .Headers }}{{ if .CheckNil }} if {{ .VarName }} != nil {
988-
{{ end }}{{ if .MustToString }}{{ $tmp := tempvar }} {{ toString .ValueName $tmp .Attribute }}
987+
{{ end }}{{ range .Headers }}{{ if .CheckNil }} if {{ .VarName }} != nil { {{ end }}{{ if .MustToString }}{{ $tmp := tempvar }} {{ toString .ValueName $tmp .Attribute }}
989988
header.Set("{{ .Name }}", {{ $tmp }}){{ else }}
990989
header.Set("{{ .Name }}", {{ .ValueName }})
991990
{{ end }}{{ if .CheckNil }} }

0 commit comments

Comments
 (0)