Open emil14 opened 4 weeks ago
component GetEnv(name string) (data string, err error)
component SetEnv(name string, data string) (data string, err error)
Now about Environ
- in Go it returns slice of key=value
strings which doesn't looks handy.
component Environ(sig any) (seq stream<MapEntry<string>>, err error)
We could generate e.g. markdown file automatically from configuration
Reference https://github.com/g4s8/envdoc
We need to think tho what should be the source of truth - source code or some kind of schema. We could even have this inside neva.yaml
and an env
field
Basically we have low level and high level functionality and which one needs to be implemented first
is not clear
Low level
We need to mimic these Go's
os
functionsGetEnv
SetEnv
Environ
High level
We need a way of defining the configuration structures without directly using the low level functions.
Reference https://github.com/sethvargo/go-envconfig