TrueBlocks / trueblocks-core

The main repository for the TrueBlocks system
https://trueblocks.io
GNU General Public License v3.0
1.05k stars 194 forks source link

Feature/3783 replace viper #3796

Open dszlachta opened 1 week ago

dszlachta commented 1 week ago

Replaces Viper package with koanf.

koanf is pretty nice, but for writing the file we need to use the underlying TOML library directly. This gives us ability to keep comments in trueBlocks.toml and also the order of settings as defined in Go structure (see src/apps/chifra/pkg/config/write_test.go).

One thing we might want to change is the migration version. If we change it, the users will get comments written in the file.

tjayrush commented 1 day ago

Looks good. Go ahead and merge it if you think it's ready.