2024-02-15 01:12:57 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-07-27 18:56:09 +02:00
|
|
|
"os"
|
2024-02-15 01:12:57 +01:00
|
|
|
|
2024-07-27 18:56:09 +02:00
|
|
|
"git.ar21.de/yolokube/grafana-backuper/internal/cmd"
|
|
|
|
"git.ar21.de/yolokube/grafana-backuper/internal/config"
|
2024-02-15 01:12:57 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-07-27 18:56:09 +02:00
|
|
|
cfg := &config.Config{}
|
2024-02-16 22:16:29 +01:00
|
|
|
|
2024-07-27 18:56:09 +02:00
|
|
|
rootCmd := cmd.NewRootCommand(cfg)
|
2024-08-19 20:12:28 +02:00
|
|
|
rootCmd.AddCommand(
|
|
|
|
cmd.NewBackupCommand(cfg),
|
|
|
|
cmd.NewRestoreCommand(cfg),
|
|
|
|
)
|
2024-02-16 21:56:27 +01:00
|
|
|
|
2024-07-27 18:56:09 +02:00
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
|
|
os.Exit(1)
|
2024-02-15 01:12:57 +01:00
|
|
|
}
|
|
|
|
}
|