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"
)

View File

@@ -10,8 +10,8 @@ import (
"text/template"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/tools/goctl/vars"
"github.com/urfave/cli"
"zero/tools/goctl/vars"
)
const configTemplate = `package main

View File

@@ -3,8 +3,7 @@ package docker
import (
"errors"
"zero/tools/goctl/gen"
"github.com/tal-tech/go-zero/tools/goctl/gen"
"github.com/urfave/cli"
)

View File

@@ -1,30 +0,0 @@
syntax = "proto3";
package recommendservice;
message RecArticle {
int64 id = 1;
}
message RecommendRequest {
// the id of the request user.
int64 uid = 1;
// how many top ranked article for this user.
int32 topk = 2;
// current hour
int32 hour = 3;
// current minute
int32 minute = 4;
// the article list.
repeated RecArticle articles = 5;
}
message RecommendResponse {
repeated int64 articles = 1;
}
service RecommendService {
// the method to get the topk performers for this user.
rpc recommend1(RecommendRequest) returns (RecommendResponse);
rpc recommend2(RecommendRequest) returns (RecommendResponse);
}

View File

@@ -4,8 +4,8 @@ import (
"strings"
"text/template"
"zero/tools/goctl/util"
"zero/tools/goctl/vars"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/vars"
)
func GenerateDockerfile(goFile string, args ...string) error {

View File

@@ -4,7 +4,7 @@ import (
"strings"
"text/template"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
func GenerateMakefile(goFile, namespace string) error {

View File

@@ -11,27 +11,26 @@ import (
"path/filepath"
"time"
"zero/core/conf"
"zero/core/hash"
"zero/core/lang"
"zero/core/logx"
"zero/core/mr"
"zero/core/stringx"
"zero/tools/goctl/api/apigen"
"zero/tools/goctl/api/dartgen"
"zero/tools/goctl/api/docgen"
"zero/tools/goctl/api/format"
"zero/tools/goctl/api/gogen"
"zero/tools/goctl/api/javagen"
"zero/tools/goctl/api/tsgen"
"zero/tools/goctl/api/validate"
"zero/tools/goctl/configgen"
"zero/tools/goctl/docker"
"zero/tools/goctl/feature"
"zero/tools/goctl/model/mongomodel"
"zero/tools/goctl/util"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/core/hash"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/mr"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/tools/goctl/api/apigen"
"github.com/tal-tech/go-zero/tools/goctl/api/dartgen"
"github.com/tal-tech/go-zero/tools/goctl/api/docgen"
"github.com/tal-tech/go-zero/tools/goctl/api/format"
"github.com/tal-tech/go-zero/tools/goctl/api/gogen"
"github.com/tal-tech/go-zero/tools/goctl/api/javagen"
"github.com/tal-tech/go-zero/tools/goctl/api/tsgen"
"github.com/tal-tech/go-zero/tools/goctl/api/validate"
"github.com/tal-tech/go-zero/tools/goctl/configgen"
"github.com/tal-tech/go-zero/tools/goctl/docker"
"github.com/tal-tech/go-zero/tools/goctl/feature"
"github.com/tal-tech/go-zero/tools/goctl/model/mongomodel"
"github.com/tal-tech/go-zero/tools/goctl/util"
"github.com/urfave/cli"
)

View File

@@ -3,7 +3,7 @@ package gen
import (
"strings"
"zero/tools/goctl/model/mongomodel/utils"
"github.com/tal-tech/go-zero/tools/goctl/model/mongomodel/utils"
)
func genMethodTemplate(funcDesc FunctionDesc, needCache bool) (template string) {

View File

@@ -5,9 +5,9 @@ import (
"strings"
"text/template"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/api/util"
"zero/tools/goctl/model/mongomodel/utils"
"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/model/mongomodel/utils"
)
const (
@@ -149,8 +149,8 @@ func getImports(imports []string, needCache bool) string {
importStr := strings.Join(imports, "\n\t")
importStr += "\"errors\"\n\t"
importStr += "\"time\"\n\t"
importStr += "\n\t\"zero/core/stores/cache\"\n\t"
importStr += "\"zero/core/stores/mongoc\"\n\t"
importStr += "\n\t\"github.com/tal-tech/go-zero/core/stores/cache\"\n\t"
importStr += "\"github.com/tal-tech/go-zero/core/stores/mongoc\"\n\t"
importStr += "\n\t\"github.com/globalsign/mgo/bson\""
return importStr
}

View File

@@ -7,7 +7,7 @@ import (
"strings"
"text/template"
"zero/tools/goctl/model/mongomodel/utils"
"github.com/tal-tech/go-zero/tools/goctl/model/mongomodel/utils"
)
func GenMongoModelByNetwork(input string, needCache bool) (string, error) {

View File

@@ -2,7 +2,7 @@ package gen
const (
quotationMark = "`"
//templates that do not use caching
// templates that do not use caching
noCacheTemplate = `package model
import (

View File

@@ -4,10 +4,9 @@ import (
"errors"
"fmt"
"zero/core/lang"
"zero/tools/goctl/model/mongomodel/gen"
"github.com/logrusorgru/aurora"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/tools/goctl/model/mongomodel/gen"
"github.com/urfave/cli"
)

View File

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

View File

@@ -45,9 +45,9 @@ imports代码生成对应model中包的引入管理仅使用于晓黑板项
"strings"
"time"
"zero/core/stores/sqlc"
"zero/core/stores/sqlx"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/stores/sqlc"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/tal-tech/go-zero/core/stringx"
"xiao/service/shared/builderx"
)
```
@@ -60,8 +60,8 @@ imports代码生成对应model中包的引入管理仅使用于晓黑板项
"strings"
"time"
"zero/core/stores/sqlx"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/tal-tech/go-zero/core/stringx"
"xiao/service/shared/builderx"
)
```

View File

@@ -6,7 +6,7 @@ import (
"sort"
"strings"
"zero/tools/goctl/model/sql/util"
"github.com/tal-tech/go-zero/tools/goctl/model/sql/util"
)
func TableConvert(outerTable OuterTable) (*InnerTable, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genDelete(table *InnerTable) (string, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genFields(fields []*InnerField) (string, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genFindAllByField(table *InnerTable) (string, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genFindLimitByField(table *InnerTable) (string, error) {

View File

@@ -4,7 +4,7 @@ import (
"bytes"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genFindOne(table *InnerTable) (string, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genFineOneByField(table *InnerTable) (string, error) {

View File

@@ -4,7 +4,7 @@ import (
"bytes"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genImports(table *InnerTable) (string, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genInsert(table *InnerTable) (string, error) {

View File

@@ -4,7 +4,7 @@ import (
"log"
"testing"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
func TestKeys(t *testing.T) {

View File

@@ -6,8 +6,8 @@ import (
"strings"
"text/template"
"zero/core/logx"
sqltemplate "zero/tools/goctl/model/sql/template"
"github.com/tal-tech/go-zero/core/logx"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func GenModel(table *InnerTable) (string, error) {

View File

@@ -4,7 +4,7 @@ import (
"bytes"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genNew(table *InnerTable) (string, error) {

View File

@@ -4,7 +4,7 @@ import (
"bytes"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genTag(in string) (string, error) {

View File

@@ -4,7 +4,7 @@ import (
"bytes"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genTypes(table *InnerTable) (string, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genUpdate(table *InnerTable) (string, error) {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"text/template"
sqltemplate "zero/tools/goctl/model/sql/template"
sqltemplate "github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
)
func genVars(table *InnerTable) (string, error) {

View File

@@ -3,7 +3,7 @@ package sqlgen
import (
"errors"
"zero/tools/goctl/model/sql/gen"
"github.com/tal-tech/go-zero/tools/goctl/model/sql/gen"
)
var (

View File

@@ -2,7 +2,7 @@ package sqltemplate
var Error = `package model
import "zero/core/stores/sqlx"
import "github.com/tal-tech/go-zero/core/stores/sqlx"
var (
ErrNotFound = sqlx.ErrNotFound

View File

@@ -7,9 +7,9 @@ import (
"strings"
"time"
"zero/core/stores/cache"
"zero/core/stores/sqlc"
"zero/core/stores/sqlx"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/stores/cache"
"github.com/tal-tech/go-zero/core/stores/sqlc"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/tal-tech/go-zero/core/stringx"
)
`

View File

@@ -3,7 +3,7 @@ package sqlmodel
import (
"go/format"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
type (

View File

@@ -9,9 +9,9 @@ import (
"strings"
"text/template"
"zero/core/stringx"
"zero/tools/goctl/api/spec"
"zero/tools/goctl/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/util"
)
var (

View File

@@ -6,7 +6,7 @@ import (
"strings"
"text/template"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/stringx"
)
var insertTemplate = `

View File

@@ -7,7 +7,7 @@ import (
"strings"
"text/template"
util2 "zero/tools/modelctl/util"
util2 "github.com/tal-tech/go-zero/tools/modelctl/util"
)
var (

View File

@@ -6,7 +6,7 @@ import (
"strings"
"text/template"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/stringx"
)
var updateTemplate = `

View File

@@ -1,6 +1,6 @@
package config
import "zero/core/logx"
import "github.com/tal-tech/go-zero/core/logx"
type Config struct {
logx.LogConf

View File

@@ -6,12 +6,12 @@ import (
"net/http"
"path"
"zero/core/conf"
"zero/core/hash"
"zero/core/lang"
"zero/core/logx"
"zero/tools/goctl/update/config"
"zero/tools/goctl/util"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/core/hash"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/tools/goctl/update/config"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
const (

View File

@@ -13,8 +13,7 @@ import (
"time"
"github.com/logrusorgru/aurora"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
func CreateIfNotExist(file string) (*os.File, error) {

View File

@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
"zero/tools/goctl/vars"
"github.com/tal-tech/go-zero/tools/goctl/vars"
)
func MkdirIfNotExist(dir string) error {