aero
aero copied to clipboard
Suggestion: A value which should never be filled for dummy values (e.g. #throw)
Inspired by https://lobste.rs/s/chxlum/changeme_is_valid_base64#c_drqazo
The use case is for when setting up a config early in a project, and you're not sure what the value will be, something like this:
:api-token {:dev "dev-token" :prod "changeme"}
In order to assist with forgetting to change the token, you could instead do
:api-token {:dev "dev-token" :prod #throw "changeme"}
which would give you early warning that something was amiss. Ideally Aero's reporting would bubble out information such as what k-path the error was at.
It might be useful to have this be the default return value for #profile, etc. too:
(read-config "#profile {:foo 10}" {:profile :bar}) ;; => 💥