Very minor refactor for removing the use of init()

new-query-chunks-api
Vinícius Garcia 2022-05-18 17:07:05 -03:00
parent 9792e11b16
commit ed0327babe
1 changed files with 6 additions and 3 deletions

View File

@ -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