From 0045f2fb61ed0d75007d7f09d6e1266509deab22 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 1 Sep 2016 21:26:21 +0200 Subject: [PATCH] Remove functions --- src/cmds/restic/cmd_dump.go | 40 ------------------------------------- src/cmds/restic/cmd_list.go | 14 ------------- 2 files changed, 54 deletions(-) diff --git a/src/cmds/restic/cmd_dump.go b/src/cmds/restic/cmd_dump.go index 9bab5151a..fb4389f66 100644 --- a/src/cmds/restic/cmd_dump.go +++ b/src/cmds/restic/cmd_dump.go @@ -67,37 +67,6 @@ func debugPrintSnapshots(repo *repository.Repository, wr io.Writer) error { return nil } -// func printTrees(repo *repository.Repository, wr io.Writer) error { -// done := make(chan struct{}) -// defer close(done) - -// trees := []restic.ID{} - -// for _, idx := range repo.Index().All() { -// for blob := range idx.Each(nil) { -// if blob.Type != pack.Tree { -// continue -// } - -// trees = append(trees, blob.ID) -// } -// } - -// for _, id := range trees { -// tree, err := restic.LoadTree(repo, id) -// if err != nil { -// fmt.Fprintf(os.Stderr, "LoadTree(%v): %v", id.Str(), err) -// continue -// } - -// fmt.Fprintf(wr, "tree_id: %v\n", id) - -// prettyPrintJSON(wr, tree) -// } - -// return nil -// } - const dumpPackWorkers = 10 // Pack is the struct used in printPacks. @@ -228,8 +197,6 @@ func (cmd CmdDump) Execute(args []string) error { return cmd.DumpIndexes() case "snapshots": return debugPrintSnapshots(repo, os.Stdout) - // case "trees": - // return printTrees(repo, os.Stdout) case "packs": return printPacks(repo, os.Stdout) case "all": @@ -239,13 +206,6 @@ func (cmd CmdDump) Execute(args []string) error { return err } - // fmt.Printf("\ntrees:\n") - - // err = printTrees(repo, os.Stdout) - // if err != nil { - // return err - // } - fmt.Printf("\nindexes:\n") err = cmd.DumpIndexes() if err != nil { diff --git a/src/cmds/restic/cmd_list.go b/src/cmds/restic/cmd_list.go index 4418dbb08..b208e3ee3 100644 --- a/src/cmds/restic/cmd_list.go +++ b/src/cmds/restic/cmd_list.go @@ -40,20 +40,6 @@ func (cmd CmdList) Execute(args []string) error { var t restic.FileType switch args[0] { - // case "blobs": - // restic.Lister - // err = repo.LoadIndex() - // if err != nil { - // return err - // } - - // for _, idx := range repo.Index().All() { - // for blob := range idx.Each(nil) { - // cmd.global.Printf("%s\n", blob.ID) - // } - // } - - // return nil case "packs": t = restic.DataFile case "index":