goctl add plugin support (#243)
* add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * remove no need * add plugin support * rename * rename * add plugin support * refactor * update plugin * refactor * refactor * refactor * update plugin * newline Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
This commit is contained in:
20
tools/goctl/plugin/demo/goctlplugin.go
Normal file
20
tools/goctl/plugin/demo/goctlplugin.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tal-tech/go-zero/tools/goctl/plugin"
|
||||
)
|
||||
|
||||
func main() {
|
||||
plugin, err := plugin.NewPlugin()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if plugin.Api != nil {
|
||||
fmt.Printf("api: %+v \n", plugin.Api)
|
||||
}
|
||||
fmt.Printf("dir: %s \n", plugin.Dir)
|
||||
fmt.Println("Enjoy anything you want.")
|
||||
}
|
||||
Reference in New Issue
Block a user