mirror of
https://github.com/restic/restic.git
synced 2026-11-28 15:26:48 +00:00
Restructure cmd/restic, no functional changes
This commit is contained in:
1 parent
2fa259816b
commit
4388474cdc
16 files changed
+309
-264
No files matched your search
@@ -10,14 +10,15 @@ import (
|
||||
)
|
||||
|
||||
type CmdList struct {
|
||||
w io.Writer
|
||||
w io.Writer
|
||||
global *GlobalOptions
|
||||
}
|
||||
|
||||
func init() {
|
||||
_, err := parser.AddCommand("list",
|
||||
"lists data",
|
||||
"The list command lists structures or data of a repository",
|
||||
&CmdList{})
|
||||
&CmdList{global: &globalOpts})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -36,7 +37,7 @@ func (cmd CmdList) Execute(args []string) error {
|
||||
return fmt.Errorf("type not specified, Usage: %s", cmd.Usage())
|
||||
}
|
||||
|
||||
s, err := OpenRepo()
|
||||
s, err := cmd.global.OpenRepository()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user