fix templates and helpers

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-01-12 13:39:43 +03:00
parent 9954ab8133
commit c5da16f9dd
5 changed files with 26 additions and 11 deletions

View File

@@ -17,6 +17,7 @@ func New{{$ServiceName}}Endpoints() []*micro_api.Endpoint {
var endpoints []*micro_api.Endpoint
{{- range .Service.Method}}
{{- if not (contains (json (httpOption .)) "null") }}
{{- if ne (httpVerb .) "" }}
endpoint := &micro_api.Endpoint{
Name: "{{$ServiceName}}.{{.Name}}",
@@ -36,6 +37,7 @@ func New{{$ServiceName}}Endpoints() []*micro_api.Endpoint {
endpoints = append(endpoints, endpoint)
{{- end}}
{{- end}}
{{- end}}
return endpoints
}