mirror of
https://github.com/restic/restic.git
synced 2026-05-08 11:35:23 +00:00
Remove error from return value of NewContentHandler
This commit is contained in:
@@ -53,10 +53,7 @@ func (cmd CmdCat) Execute(args []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
ch, err := restic.NewContentHandler(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ch := restic.NewContentHandler(s)
|
||||
|
||||
switch tpe {
|
||||
case "blob":
|
||||
|
||||
@@ -113,11 +113,7 @@ func (c CmdFind) findInTree(ch *restic.ContentHandler, id backend.ID, path strin
|
||||
func (c CmdFind) findInSnapshot(s restic.Server, id backend.ID) error {
|
||||
debug("searching in snapshot %s\n for entries within [%s %s]", id, c.oldest, c.newest)
|
||||
|
||||
ch, err := restic.NewContentHandler(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ch := restic.NewContentHandler(s)
|
||||
sn, err := ch.LoadSnapshot(id)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -125,10 +125,7 @@ func fsckTree(opts CmdFsck, ch *restic.ContentHandler, id backend.ID) error {
|
||||
func fsck_snapshot(opts CmdFsck, s restic.Server, id backend.ID) error {
|
||||
debug("checking snapshot %v\n", id)
|
||||
|
||||
ch, err := restic.NewContentHandler(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ch := restic.NewContentHandler(s)
|
||||
|
||||
sn, err := ch.LoadSnapshot(id)
|
||||
if err != nil {
|
||||
|
||||
@@ -78,7 +78,7 @@ func (cmd CmdLs) Execute(args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
ch, err := restic.NewContentHandler(s)
|
||||
ch := restic.NewContentHandler(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -97,10 +97,7 @@ func (cmd CmdSnapshots) Execute(args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
ch, err := restic.NewContentHandler(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ch := restic.NewContentHandler(s)
|
||||
|
||||
tab := NewTable()
|
||||
tab.Header = fmt.Sprintf("%-8s %-19s %-10s %s", "ID", "Date", "Source", "Directory")
|
||||
|
||||
Reference in New Issue
Block a user