Exemple #1
0
func init() {
	e = env.Init()
	if os.Getenv("travis") != "" {
		e.DbName = ""
		// we can then set up mysql travis clone
	} else {
		var err error
		connection, err = db.Connect(e)
		if err != nil {
			log.Fatal(err)
		}
		err = connection.DB.Ping()
		if err != nil {
			log.Fatal(err)
		}
	}
}
Exemple #2
0
func init() {
	ENV = env.Init()
	// NOTE slip db stuff on travis for now
	if os.Getenv("travis") != "" {
		ENV.DbName = ""
		// we can then set up mysql travis clone
	} else {
		var err error
		connection, err = db.Connect(ENV)
		if err != nil {
			log.Fatal(err)
		}
		err = connection.DB.Ping()
		if err != nil {
			log.Fatal(err)
		}
	}
}
Exemple #3
0
func init() {
	e = env.Init()
	log.SetLevel(log.DebugLevel)
	// NOTE slip db stuff on travis for now
	if os.Getenv("travis") != "" {
		e.DbName = ""
		// we can then set up mysql travis clone
	} else {
		var err error
		connection, err = Connect(e)
		if err != nil {
			panic(err)
		}
		err = connection.DB.Ping()
		if err != nil {
			panic(err)
		}
	}
}