removed newModelStructsMap func
This commit is contained in:
parent
c94879ea64
commit
bd4ed43163
3
main.go
3
main.go
@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -162,7 +163,7 @@ func (s *DB) HasBlockGlobalUpdate() bool {
|
||||
|
||||
// SingularTable use singular table by default
|
||||
func (s *DB) SingularTable(enable bool) {
|
||||
modelStructsMap = newModelStructsMap()
|
||||
modelStructsMap = sync.Map{}
|
||||
s.parent.singularTable = enable
|
||||
}
|
||||
|
||||
|
@ -17,9 +17,7 @@ var DefaultTableNameHandler = func(db *DB, defaultTableName string) string {
|
||||
return defaultTableName
|
||||
}
|
||||
|
||||
func newModelStructsMap() sync.Map { return sync.Map{} }
|
||||
|
||||
var modelStructsMap = newModelStructsMap()
|
||||
var modelStructsMap sync.Map
|
||||
|
||||
// ModelStruct model definition
|
||||
type ModelStruct struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user