Ejemplo n.º 1
0
func setConfigLocation() {
	if cfgFile != "" {
		abs, err := filepath.Abs(cfgFile)
		if err != nil {
			return
		}
		dir, file := filepath.Split(abs)
		pop.AddLookupPaths(dir)
		pop.ConfigName = file
	}
	pop.LoadConfig()
}
Ejemplo n.º 2
0
func init() {
	pop.Debug = false
	pop.AddLookupPaths("./")

	dialect := os.Getenv("SODA_DIALECT")

	var err error
	PDB, err = pop.Connect(dialect)
	if err != nil {
		log.Panic(err)
	}

	pop.MapTableName("Friend", "good_friends")
	pop.MapTableName("Friends", "good_friends")
}
Ejemplo n.º 3
0
func Test_AddLookupPaths(t *testing.T) {
	r := require.New(t)
	pop.AddLookupPaths("./foo")
	r.Contains(pop.LookupPaths(), "./foo")
}