Skip to content
This repository has been archived by the owner on Oct 8, 2018. It is now read-only.

Latest commit

 

History

History
24 lines (18 loc) · 293 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 293 Bytes

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"
  }
}