repository: extract Load/StoreJSONUnpacked

A Load/Store method for each data type is much clearer. As a result the
repository no longer needs a method to load / store json.
This commit is contained in:
Michael Eischer
2022-06-12 14:38:19 +02:00
parent fbcbd5318c
commit 89d3ce852b
22 changed files with 130 additions and 127 deletions

View File

@@ -137,7 +137,7 @@ func saveSnapshot(t testing.TB, repo restic.Repository, snapshot Snapshot) (*res
}
sn.Tree = &treeID
id, err := repo.SaveJSONUnpacked(ctx, restic.SnapshotFile, sn)
id, err := restic.SaveSnapshot(ctx, repo, sn)
if err != nil {
t.Fatal(err)
}