fix bug: miss time import (#36)
* add execute files * add protoc-osx * add rpc generation * add rpc generation * add: rpc template generation * optimize gomod cache * add README.md * format error * reactor templatex.go * update project.go & README.md * fix bug: miss time import
This commit is contained in:
@@ -2,7 +2,7 @@ package template
|
||||
|
||||
var Delete = `
|
||||
func (m *{{.upperStartCamelObject}}Model) Delete({{.lowerStartCamelPrimaryKey}} {{.dataType}}) error {
|
||||
{{if .withCache}}{{if .containsIndexCache}}_, err:=m.FindOne({{.lowerStartCamelPrimaryKey}})
|
||||
{{if .withCache}}{{if .containsIndexCache}}data, err:=m.FindOne({{.lowerStartCamelPrimaryKey}})
|
||||
if err!=nil{
|
||||
return err
|
||||
}{{end}}
|
||||
|
||||
@@ -5,6 +5,7 @@ var (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
{{if .time}}"time"{{end}}
|
||||
|
||||
"github.com/tal-tech/go-zero/core/stores/cache"
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlc"
|
||||
@@ -16,7 +17,7 @@ var (
|
||||
ImportsNoCache = `import (
|
||||
"database/sql"
|
||||
"strings"
|
||||
"time"
|
||||
{{if .time}}"time"{{end}}
|
||||
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlc"
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlx"
|
||||
|
||||
Reference in New Issue
Block a user