Skip to content

Commit

Permalink
return arg in middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey1s committed Dec 8, 2018
1 parent 5e0456f commit f9ee6ce
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
7 changes: 4 additions & 3 deletions codegen/templates/args.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
return e.directives.{{$directive.Name|ucFirst}}({{$directive.ResolveArgs "tmp" "n" }})
},
{{- end }}
}...)(ctx, func(ctx2 context.Context)(args{{$i}} interface{},err error){
{{$arg.Unmarshal (print "args" $i) "tmp" }}
}...)(ctx, func(ctx2 context.Context)(interface{}, error){
var err error
{{$arg.Unmarshal (print "arg" $i) "tmp" }}
if err != nil {
return nil, err
}
return
return arg{{ $i }}, nil
})
if err != nil {
return nil, err
Expand Down
Loading

0 comments on commit f9ee6ce

Please sign in to comment.