Use godep
This commit is contained in:
21
Godeps/_workspace/src/github.com/codegangsta/martini/env.go
generated
vendored
Normal file
21
Godeps/_workspace/src/github.com/codegangsta/martini/env.go
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
package martini
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
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 string = Dev
|
||||
|
||||
func init() {
|
||||
e := os.Getenv("MARTINI_ENV")
|
||||
if len(e) > 0 {
|
||||
Env = e
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user