refactor: refactor yaml unmarshaler (#1517)

This commit is contained in:
Kevin Wan
2022-02-09 17:22:52 +08:00
committed by GitHub
parent 05cc62f5ff
commit a40254156f
31 changed files with 68 additions and 70 deletions

View File

@@ -8,9 +8,9 @@ import (
"text/template"
"github.com/logrusorgru/aurora"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/util"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
const apiTemplate = `

View File

@@ -3,8 +3,8 @@ package apigen
import (
"fmt"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
)
const (

View File

@@ -4,9 +4,9 @@ import (
"errors"
"strings"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/urfave/cli"
)
// DartCommand create dart network request code

View File

@@ -7,9 +7,9 @@ import (
"path/filepath"
"strings"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
// DocCommand generate markdown doc file

View File

@@ -11,11 +11,11 @@ import (
"path/filepath"
"strings"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/core/errorx"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/zeromicro/go-zero/tools/goctl/api/util"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
const (

View File

@@ -12,6 +12,7 @@ import (
"time"
"github.com/logrusorgru/aurora"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/core/logx"
apiformat "github.com/zeromicro/go-zero/tools/goctl/api/format"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
@@ -19,7 +20,6 @@ import (
"github.com/zeromicro/go-zero/tools/goctl/config"
"github.com/zeromicro/go-zero/tools/goctl/util"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
const tmpFile = "%s-%d"

View File

@@ -3,8 +3,8 @@ package gogen
import (
"fmt"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
)
const (

View File

@@ -6,10 +6,10 @@ import (
"strings"
"github.com/logrusorgru/aurora"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
// JavaCommand the generate java code command entrance

View File

@@ -3,8 +3,8 @@ package ktgen
import (
"errors"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
)
// KtCommand the generate kotlin code command entrance

View File

@@ -7,11 +7,11 @@ import (
"strings"
"text/template"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/api/gogen"
conf "github.com/zeromicro/go-zero/tools/goctl/config"
"github.com/zeromicro/go-zero/tools/goctl/util"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
const apiTemplate = `

View File

@@ -3,8 +3,8 @@ package new
import (
"fmt"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
)
const (

View File

@@ -7,9 +7,9 @@ import (
"path/filepath"
"strings"
"github.com/zeromicro/antlr"
"github.com/zeromicro/go-zero/tools/goctl/api/parser/g4/gen/api"
"github.com/zeromicro/go-zero/tools/goctl/util/console"
"github.com/zeromicro/antlr"
)
type (

View File

@@ -5,9 +5,9 @@ import (
"sort"
"strings"
"github.com/zeromicro/antlr"
"github.com/zeromicro/go-zero/tools/goctl/api/parser/g4/gen/api"
"github.com/zeromicro/go-zero/tools/goctl/util/console"
"github.com/zeromicro/antlr"
)
type (

View File

@@ -5,10 +5,10 @@ import (
"fmt"
"github.com/logrusorgru/aurora"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
"github.com/urfave/cli"
)
// TsCommand provides the entry to generate typescript codes

View File

@@ -5,8 +5,8 @@ import (
"fmt"
"github.com/logrusorgru/aurora"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/api/parser"
)
// GoValidateApi verifies whether the api has a syntax error