Compare commits

..

6 commits

Author SHA1 Message Date
c8f52b5af1
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:01:54 +01:00
f9018dd392
chore(deps): update golangci/golangci-lint docker tag to v1.62.2 2024-12-07 00:19:44 +01:00
0c7af69087
test(config,git,logger): add some test functions 2024-12-07 00:19:44 +01:00
066f8d764e
add woodpecker pipeline 2024-12-07 00:19:40 +01:00
535ed5a5c6
feat(internal): add quiet flag
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-19 20:22:41 +02:00
153e452e4f
refactor(grafanabackuper): add restore function 2024-08-19 20:13:01 +02:00

View file

@ -11,7 +11,7 @@ import (
) )
func NewRestoreCommand(c *config.Config) *cobra.Command { func NewRestoreCommand(c *config.Config) *cobra.Command {
restoreCmd := &cobra.Command{ backupCmd := &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 {
}, },
} }
restoreCmd.PersistentFlags().BoolVar(&c.ForceCommits, "force", false, "Force dashboards / ignore existence check") backupCmd.PersistentFlags().BoolVar(&c.ForceCommits, "force", false, "Force dashboards / ignore existence check")
return restoreCmd return backupCmd
} }
func restore(ctx context.Context, cfg *config.Config) error { func restore(ctx context.Context, cfg *config.Config) error {