Closed tphakala closed 1 month ago
The recent updates involve embedding a configuration file within the codebase and setting default values for the BirdNET-Go system. This includes integration of the embed
package for accessing the config.yaml
file, and utilizing viper
in defaults.go
to manage default settings across various components like logging, web server, and output options.
File Path | Summary of Changes |
---|---|
.../conf/config.go |
Introduced embed package to access config.yaml , modified getDefaultConfig() to use embedded file. |
.../conf/config.yaml |
Added settings for BirdNET-Go such as debug options, node settings, and server configurations. |
.../conf/defaults.go |
Set default configuration values using viper for logging, web server, and other BirdNET-Go settings. |
🐇✨ O hark! A change doth come, so swift and neat,
With files embedded deep, where data meet.
Configs in yaml, defaults in go,
Together they blend, in code's soft flow.
Rejoice in code, this rabbit's feat! 🎉🐾
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Awesome! Suppose that this closes https://github.com/tphakala/birdnet-go/issues/120 😁
Wonder if it is possible to generate the yaml config from the viper defaults? Then the viper config could be the single place to put everything. Making it impossible to end up with weird indentation issues etc
Indentation issues were caused by VS Code and fact that yaml was embedded into .go file, that problem should be fixed now. But I need to see if Viper could generate config file with comments from defaults.
…oper default value initialization