func TestConf(t *testing.T) { c := conf.NewConf(CONF_JSON) if c.Host != HOST { t.Errorf("error: c.Host=%v, expected=%v", c.Host, HOST) } else if c.Port != PORT { t.Errorf("error: c.Port=%v, expected=%v", c.Port, PORT) } else if c.Database != DATABASE { t.Errorf("error: c.Host=%v, expected=%v", c.Host, DATABASE) } }
func init() { c = conf.NewConf("./conf.json") mode_dic = make(map[string]string) mode_dic["false"] = "NULLABLE" mode_dic["true"] = "REQUIRED" }
func init() { CONF = conf.NewConf("../../conf.json") }