Initial Commit
This commit is contained in:
commit
87a522daab
22 changed files with 1555 additions and 0 deletions
19
config/config.go
Normal file
19
config/config.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"github.com/spf13/viper"
|
||||
"git.skdevstudios.com/SK-Development-Studios/go-cal-tui/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")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue