From 1319d7072ecf9094e6515e2de4bb8e41743a5948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 2 Oct 2020 23:38:54 +0200 Subject: [PATCH] shed: Fix lint --- cmd/lotus-shed/pruning.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/lotus-shed/pruning.go b/cmd/lotus-shed/pruning.go index 6f0c20541b5..79158c3a308 100644 --- a/cmd/lotus-shed/pruning.go +++ b/cmd/lotus-shed/pruning.go @@ -137,13 +137,13 @@ var stateTreePruneCmd = &cli.Command{ return err } - defer ds.Close() + defer ds.Close() //nolint:errcheck mds, err := lkrepo.Datastore("/metadata") if err != nil { return err } - defer mds.Close() + defer mds.Close() //nolint:errcheck if cctx.Bool("only-ds-gc") { gcds, ok := ds.(datastore.GCDatastore) @@ -156,9 +156,8 @@ var stateTreePruneCmd = &cli.Command{ } fmt.Println("gc complete!") return nil - } else { - return fmt.Errorf("datastore doesnt support gc") } + return fmt.Errorf("datastore doesnt support gc") } bs := blockstore.NewBlockstore(ds) @@ -194,7 +193,7 @@ var stateTreePruneCmd = &cli.Command{ } fmt.Println() - fmt.Printf("Succesfully marked keep set! (%d objects)\n", goodSet.Len()) + fmt.Printf("Successfully marked keep set! (%d objects)\n", goodSet.Len()) if cctx.Bool("dry-run") { return nil