Skip to content

Commit

Permalink
Fix the typo StandaloneMode
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-lexliu committed Sep 22, 2022
1 parent 26e9b2d commit 25eb807
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protoc-gen-orion/orion.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type orionMiddleware struct {
}

type ProtocParams struct {
StandAloneMode bool
StandaloneMode bool
ExportedServiceDesc bool
}

Expand Down Expand Up @@ -260,7 +260,7 @@ func populate(file *descriptor.FileDescriptorProto, params ProtocParams) *data {
d := new(data)
d.FileName = *file.Name
d.PackageName = strings.Replace(file.GetPackage(), ".", "_", 10)
if params.StandAloneMode {
if params.StandaloneMode {
d.GoPackagePath = parseGoPackage(file.GetOptions().GetGoPackage())
}
d.Services = make([]*service, 0)
Expand All @@ -275,7 +275,7 @@ func generate(d *data, file *descriptor.FileDescriptorProto, params ProtocParams

origServName := svc.GetName()
servName := generator.CamelCase(origServName) // use the same logic from go-grpc generator
serviceDescVar := getServiceDescVar(d.PackageName, servName, params.ExportedServiceDesc, params.StandAloneMode)
serviceDescVar := getServiceDescVar(d.PackageName, servName, params.ExportedServiceDesc, params.StandaloneMode)

s := new(service)
s.Encoders = make([]*encoder, 0)
Expand Down Expand Up @@ -461,7 +461,7 @@ func parseProtocParams(reqParam string) (ProtocParams, error) {
if err != nil {
return ProtocParams{}, fmt.Errorf(`bad value for parameter %q: %w`, param, err)
}
pp.StandAloneMode = boolValue
pp.StandaloneMode = boolValue
case "exported-service-desc":
boolValue, err := parseBoolValue(value)
if err != nil {
Expand Down

0 comments on commit 25eb807

Please sign in to comment.