Support plugin loading
This commit is contained in:
		
							
								
								
									
										20
									
								
								plugin/template.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								plugin/template.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| package plugin | ||||
|  | ||||
| var ( | ||||
| 	tmpl = ` | ||||
| package main | ||||
|  | ||||
| import ( | ||||
| 	"github.com/micro/go-micro/plugin" | ||||
|  | ||||
| 	"{{.Path}}" | ||||
| ) | ||||
|  | ||||
| var Plugin = plugin.Config{ | ||||
| 	Name: "{{.Name}}", | ||||
| 	Type: "{{.Type}}", | ||||
| 	Path: "{{.Path}}", | ||||
| 	NewFunc: {{.Name}}.{{.NewFunc}}, | ||||
| } | ||||
| ` | ||||
| ) | ||||
		Reference in New Issue
	
	Block a user