Documentation
¶
Overview ¶
Package osenv provides the process-backed env.Reader/env.Writer: real environment variables, falling back to a .env file, plus CLI argument lookup. This is the concrete implementation a server binary injects — it imports "os" on purpose, so it never compiles into a wasm/edge binary that only ever injects a platform-specific Reader instead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arg ¶
Arg returns the value for -key=value or -key value in os.Args (skipping argv[0]). Unset flags return "" — callers apply their own default. There is no edge/wasm equivalent: a Cloudflare Worker has no argv, so this stays osenv-only rather than living in the agnostic env package.
func Reader ¶
Reader returns an env.Reader backed by the process environment, falling back to a .env file in the working directory when a key is unset.
func ReaderFrom ¶
ReaderFrom is Reader with an explicit .env path, for callers not running from the project root.
Types ¶
This section is empty.