restic: change Find to return ids

That way consumers no longer have to manually convert the returned name
to an id.
This commit is contained in:
Michael Eischer
2022-10-15 16:00:05 +02:00
parent 258b487d8f
commit 02634dce7a
6 changed files with 16 additions and 24 deletions

View File

@@ -119,7 +119,7 @@ func SearchKey(ctx context.Context, s *Repository, password string, maxKeys int,
id, err := restic.Find(ctx, s.Backend(), restic.KeyFile, keyHint)
if err == nil {
key, err := OpenKey(ctx, s, id, password)
key, err := OpenKey(ctx, s, id.String(), password)
if err == nil {
debug.Log("successfully opened hinted key %v", id)