https://github.com/lestrrat-go/env
https://github.com/lestrrat-go/env
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lestrrat-go/env
- Owner: lestrrat-go
- License: mit
- Created: 2024-08-05T00:57:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T11:51:15.000Z (10 months ago)
- Last Synced: 2025-02-26T11:14:34.618Z (4 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# env
Utilities for accessing environment variables
# SYNOPSIS
```go
import "github.com/lestrrat-go/env"env.SetPrefix("MYAPP")
value, ok := env.Lookup("FOO") // looks up MYAPP_FOO
env.Value("FOO", "defaultValue") // return defaultValue if MYAPP_FOO is not set
env.SetValue("FOO", "newValue") // set MYAPP_FOO
```