dont tag if tag_path is empty
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
9ed1ca9a89
commit
5ecc4986dd
3
ast.go
3
ast.go
@ -20,6 +20,9 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (g *Generator) astGenerate(plugin *protogen.Plugin) error {
|
func (g *Generator) astGenerate(plugin *protogen.Plugin) error {
|
||||||
|
if g.tagPath == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
for _, file := range plugin.Files {
|
for _, file := range plugin.Files {
|
||||||
if !file.Generate {
|
if !file.Generate {
|
||||||
continue
|
continue
|
||||||
|
2
main.go
2
main.go
@ -13,7 +13,7 @@ var (
|
|||||||
flagDebug = flag.Bool("debug", false, "")
|
flagDebug = flag.Bool("debug", false, "")
|
||||||
flagStandalone = flag.Bool("standalone", false, "")
|
flagStandalone = flag.Bool("standalone", false, "")
|
||||||
flagComponents = flag.String("components", "micro|rpc|http|client|server", "")
|
flagComponents = flag.String("components", "micro|rpc|http|client|server", "")
|
||||||
flagTagPath = flag.String("tag_path", ".", "")
|
flagTagPath = flag.String("tag_path", "", "")
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user