-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from GeneralFire/allow_reflect_gen_unbound
Allow reflect gen unbound
- Loading branch information
Showing
8 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,13 @@ package main | |
import ( | ||
"flag" | ||
"fmt" | ||
"github.com/utrack/clay/v3/cmd/protoc-gen-goclay/third-party/grpc-gateway/internals/codegenerator" | ||
"io" | ||
"io/ioutil" | ||
"os" | ||
"strings" | ||
|
||
"github.com/utrack/clay/v3/cmd/protoc-gen-goclay/third-party/grpc-gateway/internals/codegenerator" | ||
|
||
"github.com/golang/glog" | ||
"github.com/utrack/clay/v3/cmd/protoc-gen-goclay/genhandler" | ||
"github.com/utrack/clay/v3/cmd/protoc-gen-goclay/third-party/grpc-gateway/internals/descriptor" | ||
|
@@ -32,6 +33,7 @@ var ( | |
implFileNameTmpl = flag.String("impl_file_name_tmpl", "{{ if .MethodName }}{{ .MethodName }}{{ else }}{{ .ServiceName }}{{ end }}", "template for generating implementations filename") | ||
withTests = flag.Bool("tests", true, "generate simple unit tests for proto Services") | ||
pathsParam = flag.String("paths", "", "if you want to use source_relative instead of import which is default (see google.golang.org/[email protected]/compiler/protogen/protogen.go:177 for more details)") | ||
genUnboundMethods = flag.Bool("generate_unbound_methods", false, "gRPC API generate_unbound_methods (for swagger = true)") | ||
) | ||
|
||
func main() { | ||
|
@@ -81,6 +83,7 @@ func main() { | |
reg.SetAllowDeleteBody(*allowDeleteBody) | ||
reg.SetPrefix(*importPrefix) | ||
reg.SetDisableDefaultErrors(true) | ||
reg.SetGenerateUnboundMethods(*genUnboundMethods) | ||
for k, v := range pkgMap { | ||
reg.AddPkgMap(k, v) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters