Restructure cmd/restic, no functional changes

This commit is contained in:
Alexander Neumann committed 2015-06-21 17:40:22 +02:00
1 parent 2fa259816b
commit 4388474cdc
16 files changed
+309 -264

No files matched your search

+4 -3
View File
@@ -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
}