package
0.4.0
Repository: https://github.com/ory/common.git
Documentation: pkg.go.dev

# README

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

# Functions

Getenv retrieves the value of the environment variable named by the key.