chore: lint: fix lint errors with new linting config

Ref: https://github.com/filecoin-project/lotus/issues/11967
This commit is contained in:
Rod Vagg
2024-05-13 14:52:09 +10:00
parent 6a8110322d
commit 26d3fd2ecc
66 changed files with 128 additions and 153 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ type BackupApiFn func(ctx *cli.Context) (BackupAPI, jsonrpc.ClientCloser, error)
func BackupCmd(repoFlag string, rt repo.RepoType, getApi BackupApiFn) *cli.Command {
var offlineBackup = func(cctx *cli.Context) error {
logging.SetLogLevel("badger", "ERROR") // nolint:errcheck
_ = logging.SetLogLevel("badger", "ERROR")
repoPath := cctx.String(repoFlag)
r, err := repo.NewFS(repoPath)
+3 -3
View File
@@ -574,7 +574,7 @@ func interactiveDeal(cctx *cli.Context) error {
cs := readline.NewCancelableStdin(afmt.Stdin)
go func() {
<-ctx.Done()
cs.Close() // nolint:errcheck
_ = cs.Close()
}()
rl := bufio.NewReader(cs)
@@ -2327,7 +2327,7 @@ func OutputDataTransferChannels(out io.Writer, channels []lapi.DataTransferChann
for _, channel := range sendingChannels {
w.Write(toChannelOutput("Sending To", channel, verbose))
}
w.Flush(out) //nolint:errcheck
_ = w.Flush(out)
fmt.Fprintf(out, "\nReceiving Channels\n\n")
w = tablewriter.New(tablewriter.Col("ID"),
@@ -2341,7 +2341,7 @@ func OutputDataTransferChannels(out io.Writer, channels []lapi.DataTransferChann
for _, channel := range receivingChannels {
w.Write(toChannelOutput("Receiving From", channel, verbose))
}
w.Flush(out) //nolint:errcheck
_ = w.Flush(out)
}
func channelStatusString(status datatransfer.Status) string {
+1 -2
View File
@@ -131,9 +131,8 @@ func infoCmdAct(cctx *cli.Context) error {
if err != nil {
if strings.Contains(err.Error(), "actor not found") {
continue
} else {
return err
}
return err
}
mbLockedSum = big.Add(mbLockedSum, mbal.Locked)
mbAvailableSum = big.Add(mbAvailableSum, mbal.Escrow)
+1 -1
View File
@@ -5,5 +5,5 @@ import (
)
func init() {
logging.SetLogLevel("watchdog", "ERROR")
_ = logging.SetLogLevel("watchdog", "ERROR")
}
+1 -1
View File
@@ -122,7 +122,7 @@ func printChecks(printer io.Writer, checkGroups [][]api.MessageCheckStatus, prot
func askUser(printer io.Writer, q string, def bool) bool {
var resp string
fmt.Fprint(printer, q)
fmt.Scanln(&resp)
_, _ = fmt.Scanln(&resp)
resp = strings.ToLower(resp)
if len(resp) == 0 {
return def