Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ikenfin/getenvor

Simple environment values getter with default value support.
https://github.com/ikenfin/getenvor

Last synced: about 2 months ago
JSON representation

Simple environment values getter with default value support.

Awesome Lists containing this project

README

        

# getenvor

Simple `Getenv` function with default value support.

Usage:
```golang
import (
"http"
. "github.com/ikenfin/getenvor"
)

func main() {
host := GetenvOr("HOST", "127.0.0.1") + ":" + GetenvOr("PORT", "3000")

err := http.ListenAndServe(host, nil)
// ...
}
```