Skip to content

Commit

Permalink
use results declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbirch authored Apr 17, 2018
1 parent dd0273d commit eb4f3b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type {{.Interface}}{{.Name}}Invocation struct {
{{if and .Parameters .Results}}
// New{{.Interface}}{{.Name}}Invocation creates a new instance of {{.Interface}}{{.Name}}Invocation
func New{{.Interface}}{{.Name}}Invocation({{range .Parameters}}{{.Name}} {{.ValueType.FieldFormat}}, {{end}}{{range .Results}}{{.Name}} {{.ValueType.FieldFormat}}, {{end}}) *{{.Interface}}{{.Name}}Invocation {
func New{{.Interface}}{{.Name}}Invocation({{range .Parameters}}{{.Name}} {{.ValueType.FieldFormat}}, {{end}}{{.ResultsDeclaration}}) *{{.Interface}}{{.Name}}Invocation {
invocation := new({{.Interface}}{{.Name}}Invocation)
{{range .Parameters}} invocation.Parameters.{{.TitleCase}} = {{.Name}}
Expand Down

0 comments on commit eb4f3b7

Please sign in to comment.