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