spiegel/main.go
Ada 7a9dd706de
Some checks failed
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/push/lint Pipeline failed
♻️ Make configuration structure more clean
2024-04-04 18:02:04 +02:00

26 lines
512 B
Go

package main
import (
"git.gnous.eu/ada/git-mirror/internal/config"
"github.com/sirupsen/logrus"
)
func main() {
initConfig, err := config.LoadToml("config.example.toml")
if err != nil {
logrus.Fatal(err)
}
err = initConfig.Verify()
if err != nil {
logrus.Fatal(err)
}
initConfig.Log.Init()
logrus.Info("Config loaded")
logrus.Debug("Config: ", initConfig)
cloneConfig := initConfig.RepoList[0]
cloneConfig.FullPath = initConfig.CloneDirectory + cloneConfig.Name
cloneConfig.FullClone()
}