embeded templates

This commit is contained in:
steven carpenter 2025-07-25 16:01:48 -04:00
parent bf78461bbb
commit 9e4d1a6a28
18 changed files with 63 additions and 58 deletions

View file

@ -0,0 +1,19 @@
package config
import (
"github.com/spf13/viper"
"{{.ModName}}/internal/logger"
)
func Init() {
viper.SetConfigName("config") // config.yaml
viper.SetConfigType("yaml")
viper.AddConfigPath(".")
err := viper.ReadInConfig()
if err != nil {
logger.Log.Info("No config file found; using defaults.")
}
viper.SetDefault("app.theme", "dark")
}