mirror of
https://github.com/restic/restic.git
synced 2026-08-19 20:13:28 +00:00
Create root command via function
This commit is contained in:
@@ -29,6 +29,12 @@ import (
|
||||
"github.com/restic/restic/internal/restic"
|
||||
)
|
||||
|
||||
func registerDebugCommand(cmd *cobra.Command) {
|
||||
cmd.AddCommand(
|
||||
newDebugCommand(),
|
||||
)
|
||||
}
|
||||
|
||||
func newDebugCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "debug",
|
||||
@@ -41,10 +47,6 @@ func newDebugCommand() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdRoot.AddCommand(newDebugCommand())
|
||||
}
|
||||
|
||||
func newDebugDumpCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "dump [indexes|snapshots|all|packs]",
|
||||
|
||||
Reference in New Issue
Block a user