bubblewand/embed/templates/config/config.go.tmpl

19 lines
352 B
Cheetah

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")
}