Documentation
¶
Overview ¶
Package env reads and writes configuration through an injected source, agnostic of where that source lives. This keeps the package wasm-safe (no "os" import): a server binary injects a Reader/Writer backed by the process environment (see the osenv subpackage), while an edge binary injects one backed by its own platform binding (e.g. Cloudflare env vars) — the same Get/GetRequired call works against either.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Reader ¶ added in v0.0.7
Reader returns the value of key from whatever source it wraps, or "" if key is unset there. "" always means "not found" — no separate ok bool, matching the rest of the ecosystem's convention.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package osenv provides the process-backed env.Reader/env.Writer: real environment variables, falling back to a .env file, plus CLI argument lookup.
|
Package osenv provides the process-backed env.Reader/env.Writer: real environment variables, falling back to a .env file, plus CLI argument lookup. |
Click to show internal directories.
Click to hide internal directories.