package martini import ( "os" ) // Envs const ( Dev string = "development" Prod string = "production" Test string = "test" ) // Env is the environment that Martini is executing in. The MARTINI_ENV is read on initialization to set this variable. var Env = Dev func setENV(e string) { if len(e) > 0 { Env = e } } func init() { setENV(os.Getenv("MARTINI_ENV")) }