mirror of https://github.com/VinGarcia/ksql.git
Very minor refactor for removing the use of init()
parent
9792e11b16
commit
ed0327babe
9
ksql.go
9
ksql.go
|
@ -14,12 +14,15 @@ import (
|
|||
"github.com/vingarcia/ksql/ksqltest"
|
||||
)
|
||||
|
||||
var selectQueryCache = map[string]map[reflect.Type]string{}
|
||||
var selectQueryCache = initializeQueryCache()
|
||||
|
||||
func init() {
|
||||
func initializeQueryCache() map[string]map[reflect.Type]string {
|
||||
cache := map[string]map[reflect.Type]string{}
|
||||
for dname := range supportedDialects {
|
||||
selectQueryCache[dname] = map[reflect.Type]string{}
|
||||
cache[dname] = map[reflect.Type]string{}
|
||||
}
|
||||
|
||||
return cache
|
||||
}
|
||||
|
||||
// DB represents the ksql client responsible for
|
||||
|
|
Loading…
Reference in New Issue