2024-09-14 04:21:14 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-09-24 20:43:54 +00:00
|
|
|
"log/slog"
|
2024-09-14 04:21:14 +00:00
|
|
|
"os"
|
|
|
|
|
2024-09-20 21:21:41 +00:00
|
|
|
"git.staur.ca/stobbsm/kea-manage/cmd"
|
2024-09-20 15:21:18 +00:00
|
|
|
"github.com/spf13/viper"
|
2024-09-14 04:21:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-09-24 20:43:54 +00:00
|
|
|
slog.SetLogLoggerLevel(slog.LevelDebug)
|
2024-09-20 15:21:18 +00:00
|
|
|
viper.SetConfigName("kea-manage")
|
|
|
|
viper.AddConfigPath("/etc")
|
|
|
|
viper.AddConfigPath(os.Getenv("HOME") + "/.config/kea-manage")
|
2024-09-24 20:43:54 +00:00
|
|
|
viper.AddConfigPath(".")
|
|
|
|
if err := viper.ReadInConfig(); err != nil {
|
|
|
|
slog.Error("error while reading configuration", err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
2024-09-20 21:21:41 +00:00
|
|
|
cmd.Execute()
|
2024-09-14 04:21:14 +00:00
|
|
|
}
|