mirror of
https://github.com/restic/restic.git
synced 2025-12-12 03:11:56 +00:00
Remove Each(), add basic stats
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
@@ -32,10 +31,10 @@ func list_keys(s restic.Server) error {
|
||||
return err
|
||||
}
|
||||
|
||||
s.Each(backend.Key, func(id backend.ID, data []byte, err error) {
|
||||
k := restic.Key{}
|
||||
err = json.Unmarshal(data, &k)
|
||||
s.EachID(backend.Key, func(id backend.ID) {
|
||||
k, err := restic.LoadKey(s, id)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "LoadKey() failed: %v\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user