Example #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)
		}
	}
}
Example #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)
		}
	}
}