diff --git a/templates_test/main_test/postgres_main.tpl b/templates_test/main_test/postgres_main.tpl index bd4c4e3..cac1881 100644 --- a/templates_test/main_test/postgres_main.tpl +++ b/templates_test/main_test/postgres_main.tpl @@ -10,12 +10,6 @@ type Config struct { Postgres PostgresCfg `toml:"postgres"` } -var ( - cfg *Config - testCfg *Config - dbConn *sql.DB -) - func TestMain(m *testing.M) { rand.Seed(time.Now().UnixNano()) diff --git a/templates_test/singleton/main_helper_funcs.tpl b/templates_test/singleton/main_helper_funcs.tpl index 911b212..7d3b79e 100644 --- a/templates_test/singleton/main_helper_funcs.tpl +++ b/templates_test/singleton/main_helper_funcs.tpl @@ -1,6 +1,7 @@ -var testCfg *Config - -var dbConn *sql.DB +var ( + testCfg *Config + dbConn *sql.DB +) func InitViper() error { var err error @@ -16,7 +17,7 @@ func InitViper() error { } else { wd = wd + "/.." } -fmt.Println(wd) + fmt.Println(wd) configPaths := []string{wd} if len(configHome) > 0 { configPaths = append(configPaths, filepath.Join(configHome, "sqlboiler"))