~bigbes/core-go

ref: 46a4ad6a4ded21294e5561d8094833674a21ec7d core-go/config/config.go -rw-r--r-- 1.5 KiB
296f02e4 — Drew DeVault 2 years ago
config: print loaded config(s) to log
3c1346e6 — Conrad Hoffmann 2 years ago
config: allow spreading config over multiple files

This is the Go-equivalent to
https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/47657

This commit enables spreading the config in /etc/sr.ht - and, crucially,
_only_ in /etc/sr.ht - over multiple .ini files.

If a file config.ini is found (either in current or parent directory, or
/etc/sr.ht) it (and only it) is loaded and any other ini files are
ignored. To utilize multiple configs, they must be in /etc/sr.ht, and
none of them must be called config.ini.

Spreading the config over multiple files will make it much easier to
create containerized versions, where e.g. different secrets can be made
available in different files, but rendering it all into one big file
would require some preprocessing.
f44afb10 — Simon Ser 4 years ago
go fmt
f9731e15 — Drew DeVault 5 years ago
Various bug fixes per pages.sr.ht
0d5262df — Drew DeVault 5 years ago
config: add GetOrigin function

This implements the same behavior as Python's srht.config.get_origin.
789f4a81 — Drew DeVault 5 years ago
Simplify server module