Add goctl kotlin support

This commit is contained in:
stevenzack
2020-08-14 09:02:32 +08:00
committed by Kevin Wan
parent 4b636cd293
commit 926d746df5
6 changed files with 298 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"fmt"
"github.com/tal-tech/go-zero/tools/goctl/api/ktgen"
"os"
"github.com/tal-tech/go-zero/core/logx"
@@ -150,6 +151,25 @@ var (
},
Action: dartgen.DartCommand,
},
{
Name: "kt",
Usage: "generate kotlin code for provided api file",
Flags: []cli.Flag{
cli.StringFlag{
Name: "dir",
Usage: "the target directory",
},
cli.StringFlag{
Name: "api",
Usage: "the api file",
},
cli.StringFlag{
Name: "pkg",
Usage: "define package name for kotlin file",
},
},
Action: ktgen.KtCommand,
},
},
},
{