update package reference
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -2,7 +2,7 @@ package gen
|
||||
|
||||
const (
|
||||
quotationMark = "`"
|
||||
//templates that do not use caching
|
||||
// templates that do not use caching
|
||||
noCacheTemplate = `package model
|
||||
|
||||
import (
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"zero/tools/goctl/api/spec"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/api/spec"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user