e1.0.1 Minor feature to register config with struct tag.

This commit is contained in:
2025-04-23 00:34:15 -04:00
parent e8519145c7
commit d8b12a2871
2 changed files with 70 additions and 2 deletions

View File

@ -207,7 +207,6 @@ func printLogConfig(cfg LogConfig) {
func verifyConfig(cfg LogConfig) {
allCorrect := true
// Check each modified value
if cfg.Level != 2 {
fmt.Printf("ERROR: Level is %d, expected 2\n", cfg.Level)
allCorrect = false
@ -238,7 +237,6 @@ func verifyConfig(cfg LogConfig) {
allCorrect = false
}
// Check that unmodified values retained their defaults
if cfg.Directory != "./logs" {
fmt.Printf("ERROR: Directory changed to %s, expected './logs'\n", cfg.Directory)
allCorrect = false