Compare commits

..

6 commits

Author SHA1 Message Date
6302de004f
feat(cmd): add sequence flag to execute multiple functions
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/build unknown status
2024-12-07 01:04:12 +01:00
91df45ed5f
chore(deps): update golangci/golangci-lint docker tag to v1.62.2 2024-12-07 01:04:11 +01:00
da8b10f7b8
test(config,git,logger): add some test functions 2024-12-07 01:04:11 +01:00
b19cf01534
add woodpecker pipeline 2024-12-07 01:04:11 +01:00
75e164baac
feat(internal): add quiet flag 2024-12-07 01:04:10 +01:00
b14c22f4a2
refactor(grafanabackuper): add restore function 2024-12-07 01:04:08 +01:00

View file

@ -11,7 +11,7 @@ import (
) )
func NewRestoreCommand(c *config.Config) *cobra.Command { func NewRestoreCommand(c *config.Config) *cobra.Command {
backupCmd := &cobra.Command{ restoreCmd := &cobra.Command{
Use: "restore", Use: "restore",
Short: "Restore the dashboards from a git repository to grafana.", Short: "Restore the dashboards from a git repository to grafana.",
Long: "Restore the dashboards from a git repository to grafana.", Long: "Restore the dashboards from a git repository to grafana.",
@ -35,9 +35,9 @@ func NewRestoreCommand(c *config.Config) *cobra.Command {
}, },
} }
backupCmd.PersistentFlags().BoolVar(&c.ForceCommits, "force", false, "Force dashboards / ignore existence check") restoreCmd.PersistentFlags().BoolVar(&c.ForceCommits, "force", false, "Force dashboards / ignore existence check")
return backupCmd return restoreCmd
} }
func restore(ctx context.Context, cfg *config.Config) error { func restore(ctx context.Context, cfg *config.Config) error {