update package reference

This commit is contained in:
kevin
2020-08-08 16:40:10 +08:00
parent d19d25c72f
commit 0a7e0cce77
377 changed files with 881 additions and 1423 deletions

View File

@@ -7,9 +7,8 @@ import (
"strings"
"text/template"
"zero/tools/goctl/util"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/urfave/cli"
)

View File

@@ -4,9 +4,8 @@ import (
"errors"
"strings"
"zero/core/lang"
"zero/tools/goctl/api/parser"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
"github.com/urfave/cli"
)

View File

@@ -4,8 +4,8 @@ import (
"os"
"text/template"
"zero/core/logx"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
const apiTemplate = `import 'api.dart';

View File

@@ -4,8 +4,8 @@ import (
"os"
"text/template"
"zero/core/logx"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
const dataTemplate = `// --{{with .Info}}{{.Title}}{{end}}--

View File

@@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
func genVars(dir string) error {

View File

@@ -6,8 +6,8 @@ import (
"reflect"
"strings"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
)
func lowCamelCase(s string) string {

View File

@@ -7,10 +7,10 @@ import (
"strconv"
"strings"
"zero/core/stringx"
"zero/tools/goctl/api/gogen"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/tools/goctl/api/gogen"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
)
const (

View File

@@ -7,8 +7,7 @@ import (
"path/filepath"
"strings"
"zero/tools/goctl/api/parser"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
"github.com/urfave/cli"
)

View File

@@ -11,11 +11,9 @@ import (
"strconv"
"strings"
"zero/tools/goctl/api/util"
"zero/core/errorx"
"zero/tools/goctl/api/parser"
"github.com/tal-tech/go-zero/core/errorx"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/urfave/cli"
)

View File

@@ -12,13 +12,12 @@ import (
"sync"
"time"
"zero/core/lang"
apiformat "zero/tools/goctl/api/format"
"zero/tools/goctl/api/parser"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/core/lang"
apiformat "github.com/tal-tech/go-zero/tools/goctl/api/format"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/urfave/cli"
)

View File

@@ -5,8 +5,8 @@ import (
"fmt"
"text/template"
"zero/tools/goctl/api/util"
"zero/tools/goctl/vars"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/vars"
)
const (

View File

@@ -6,8 +6,8 @@ import (
"strconv"
"text/template"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
)
const (

View File

@@ -8,10 +8,10 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"zero/tools/goctl/vars"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/vars"
)
const (

View File

@@ -7,9 +7,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"zero/tools/goctl/vars"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/vars"
)
const logicTemplate = `package logic

View File

@@ -8,9 +8,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"zero/tools/goctl/vars"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/vars"
)
const mainTemplate = `package main

View File

@@ -8,11 +8,11 @@ import (
"strings"
"text/template"
"zero/core/collection"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"zero/tools/goctl/vars"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/vars"
)
const (

View File

@@ -6,8 +6,8 @@ import (
"path"
"text/template"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
)
const (

View File

@@ -9,9 +9,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const (

View File

@@ -9,9 +9,9 @@ import (
"path/filepath"
"strings"
"zero/core/collection"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
)
func getParentPackage(dir string) (string, error) {

View File

@@ -5,11 +5,10 @@ import (
"fmt"
"strings"
"zero/core/lang"
"zero/tools/goctl/api/parser"
"zero/tools/goctl/util"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/urfave/cli"
)

View File

@@ -7,9 +7,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const (

View File

@@ -9,10 +9,10 @@ import (
"strings"
"text/template"
"zero/core/stringx"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const packetTemplate = `package com.xhb.logic.http.packet.{{.packet}};

View File

@@ -8,9 +8,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const getSetTemplate = `

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"os"
"zero/core/lang"
"zero/tools/goctl/api/parser"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
)
func main() {

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"strings"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
type (

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
const (

View File

@@ -7,7 +7,7 @@ import (
"io"
"io/ioutil"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
type Parser struct {

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"strings"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
type rootState struct {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
type serviceState struct {

View File

@@ -1,6 +1,6 @@
package parser
import "zero/tools/goctl/api/spec"
import "github.com/tal-tech/go-zero/tools/goctl/api/spec"
type state interface {
process(api *spec.ApiSpec) (state, error)

View File

@@ -9,7 +9,7 @@ import (
"sort"
"strings"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
var (

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
type typeState struct {

View File

@@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
const (

View File

@@ -4,9 +4,10 @@ import (
"errors"
"fmt"
"strings"
"zero/core/stringx"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/util"
)
func (p *Parser) validate(api *spec.ApiSpec) (err error) {

View File

@@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"zero/core/stringx"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const (

View File

@@ -4,11 +4,10 @@ import (
"errors"
"fmt"
"zero/core/lang"
"zero/tools/goctl/api/parser"
"zero/tools/goctl/util"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/urfave/cli"
)

View File

@@ -6,9 +6,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const (

View File

@@ -7,9 +7,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const (

View File

@@ -5,9 +5,9 @@ import (
"io"
"strings"
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
apiutil "github.com/tal-tech/go-zero/tools/goctl/api/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
func writeProperty(writer io.Writer, member spec.Member, indent int, prefixForType func(string) string) error {

View File

@@ -1,6 +1,6 @@
package util
import "zero/tools/goctl/api/spec"
import "github.com/tal-tech/go-zero/tools/goctl/api/spec"
func GetAnnotationValue(annos []spec.Annotation, key, field string) (string, bool) {
for _, anno := range annos {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
)
func DecomposeType(t string) (result []string, err error) {

View File

@@ -7,10 +7,10 @@ import (
"os"
"path"
"strings"
"zero/tools/goctl/api/spec"
"zero/core/lang"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
func MaybeCreateFile(dir, subdir, file string) (fp *os.File, created bool, err error) {

View File

@@ -4,9 +4,8 @@ import (
"errors"
"fmt"
"zero/tools/goctl/api/parser"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
"github.com/urfave/cli"
)