first commit

This commit is contained in:
king
2021-01-01 20:30:52 +08:00
commit d4be972494
12 changed files with 1309 additions and 0 deletions

32
main.go Normal file
View File

@ -0,0 +1,32 @@
package main
import (
"fmt"
"github.com/urfave/cli/v2"
"github.com/zeromicro/goctl-swagger/action"
"os"
"runtime"
)
var (
version = "20210101"
commands = []*cli.Command{
{
Name: "swagger",
Usage: "generates swagger.json",
Action: action.Generator,
Flags: []cli.Flag{},
},
}
)
func main() {
app := cli.NewApp()
app.Usage = "a plugin of goctl to generate swagger.json"
app.Version = fmt.Sprintf("%s %s/%s", version, runtime.GOOS, runtime.GOARCH)
app.Commands = commands
if err := app.Run(os.Args); err != nil {
fmt.Printf("goctl-swagger: %+v\n", err)
}
}