Skip to content

Commit

Permalink
[stub] cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsannm committed Sep 1, 2022
1 parent 1b918f3 commit dd6de95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 70 deletions.
12 changes: 4 additions & 8 deletions exmples/simple-rest-server/stub/sampleservice.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 2 additions & 62 deletions internal/tpl/go/stub.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ func Mock{{$methodName}}(
type {{$serviceName}}StubMock struct {
{{ range .RESTs }}
{{$methodName := .Name}}
{{- if ne $methodName "" }}
{{- if ne $methodName "" -}}
{{toLower $methodName}} func(ctx context.Context, req *{{.Request.Name}}, opt ...stub.RESTOption) (*{{.Response.Name}}, *stub.Error)
{{ end }}
{{- end -}}
{{- end }}
}

Expand Down Expand Up @@ -176,63 +176,3 @@ func (s {{$serviceName}}StubMock) {{$methodName}}(
}
{{ end }}
{{- end }}




























































0 comments on commit dd6de95

Please sign in to comment.