Skip to content

Commit

Permalink
fix: fix ref processor (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyJavaBean authored Oct 31, 2024
1 parent 467e9a9 commit d8f59e2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion generator/golang/templates/ref/ref_tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import (
`

var processorRef = `
{{- $BasePrefix := ServicePrefix .Base}}
{{- $BaseService := ServiceName .Base}}
{{- $ServiceName := .GoName}}
Expand Down Expand Up @@ -89,6 +88,23 @@ var New{{$ResType}} = {{$RefPackage}}.New{{$ResType}}
{{- end}}{{/* range .Functions */}}
{{- if not Features.NoProcessor}}
// processor refs
{{- $ProcessorName := printf "%s%s" $ServiceName "Processor"}}
{{- $ClientName := printf "%s%s" $ServiceName "Client"}}
type {{$ProcessorName}} = {{$RefPackage}}.{{$ProcessorName}}
var New{{$ProcessorName}} = {{$RefPackage}}.New{{$ProcessorName}}
var New{{$ClientName}} = {{$RefPackage}}.New{{$ClientName}}
var New{{$ClientName}}Factory = {{$RefPackage}}.New{{$ClientName}}
var New{{$ClientName}}Protocol = {{$RefPackage}}.New{{$ClientName}}Protocol
{{- end}}{{/* if not Features.NoProcessor */}}
`

var constRef = `{{- $Consts := .Constants.GoConstants}}
Expand Down

0 comments on commit d8f59e2

Please sign in to comment.