~/runtimelab $ cat ./env-parser/README
Build your own dotenv parser
A `.env` file has no specification. Every implementation disagrees about quotes, escapes, interpolation and where a value ends — so parsing one is a real parser exercise with no grammar to copy, only behaviour to pin down and defend.
what you end up with
RuntimeEnv — a dotenv parser that documents its own dialect
- stages
- 21
- estimated
- 15–25 h
- level
- Intermediate
- track
- Backend Engineering
- language
- Go
- lines, comments and the `export ` prefix
- single quotes are literal, double quotes are not
- escapes, and the ones that only exist in one dialect
- multi-line values
- ${VAR} interpolation, with :- defaults
- a `$` that is not a variable
- a `#` inside a quoted value
- CRLF, and a UTF-8 BOM on line one
- precedence between the process environment and the file
The stage list opens once you sign in — it is the challenge, not the pitch. Signing in is free, and the first stages of every challenge are too.