[#1714] lens: Add open*COMPONENT* funcs

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-08-24 15:09:52 +03:00 committed by LeL
parent 01d7c007aa
commit fa18100489
10 changed files with 58 additions and 60 deletions

View file

@ -30,11 +30,9 @@ func listFunc(cmd *cobra.Command, _ []string) {
return err
}
db, err := writecache.OpenDB(vPath, true)
common.ExitOnErr(cmd, common.Errf("could not open write-cache db: %w", err))
db := openWC(cmd)
defer db.Close()
err = writecache.IterateDB(db, wAddr)
err := writecache.IterateDB(db, wAddr)
common.ExitOnErr(cmd, common.Errf("write-cache iterator failure: %w", err))
}