Documentation
¶
Overview ¶
Package env reads configuration from the process environment, falling back to a .env file when the variable isn't set. This makes one call work both in production (real env vars) and local dev under tools like the tinywasm daemon, which runs the app binary as a child process without exporting .env into its environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arg ¶ added in v0.0.2
Arg returns the value for -key=value or -key value in os.Args (skipping argv[0]). Unset flags return "" — callers apply their own default, same as Get. Common pattern: tools like the tinywasm dev daemon pass runtime config as CLI flags to the child process instead of env vars.
func Get ¶ added in v0.0.2
Get returns the value of key from the process environment, or — if unset — the value of key=... in path (typically ".env" in the working directory). Values wrapped in double quotes have them stripped. Returns "" if the key is set nowhere.
Types ¶
This section is empty.