go-zero/tools/goctl/api/main.go

22 lines
301 B
Go
Raw Normal View History

2020-07-29 17:11:41 +08:00
package main
import (
"fmt"
"os"
2020-08-08 16:40:10 +08:00
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
2020-07-29 17:11:41 +08:00
)
func main() {
if len(os.Args) <= 1 {
return
}
p, err := parser.NewParser(os.Args[1])
lang.Must(err)
api, err := p.Parse()
lang.Must(err)
fmt.Println(api)
}