Files
vault/vendor/github.com/ory-am/common/env
Jeff Mitchell 1651787019 Update deps
2016-06-30 14:19:03 -04:00
..
2016-06-30 14:19:03 -04:00
2016-06-30 14:19:03 -04:00

ory-libs/env

Adds defaults to os.GetEnv() and saves you 3 lines of code:

import "github.com/ory-am/common/env"

func main() {
  port := env.Getenv("PORT", "80")
}

versus

import "os"

func main() {
  port := os.Getenv("PORT")
  if port == "" {
    port = "80"
  }
}