Revert "fix lint"

This reverts commit 325a4c0e5b.
This commit is contained in:
Aayush 2022-03-02 15:29:27 -05:00
parent 17ac583508
commit 48e28898a6
2 changed files with 18 additions and 14 deletions

View File

@ -643,7 +643,9 @@ var NetStatCmd = &cli.Command{
}
enc := json.NewEncoder(os.Stdout)
return enc.Encode(result)
enc.Encode(result)
return nil
},
}
@ -692,19 +694,21 @@ var NetLimitCmd = &cli.Command{
return api.NetSetLimit(ctx, scope, limit)
} else {
if len(args) != 1 {
return xerrors.Errorf("must specify exactly one scope")
}
scope := args[0]
result, err := api.NetLimit(ctx, scope)
if err != nil {
return err
}
enc := json.NewEncoder(os.Stdout)
enc.Encode(result)
}
if len(args) != 1 {
return xerrors.Errorf("must specify exactly one scope")
}
scope := args[0]
result, err := api.NetLimit(ctx, scope)
if err != nil {
return err
}
enc := json.NewEncoder(os.Stdout)
return enc.Encode(result)
return nil
},
}

View File

@ -26,7 +26,7 @@ func ResourceManager(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceMan
limitsIn, err := os.Open(limitsFile)
switch {
case err == nil:
defer limitsIn.Close() //nolint:errcheck
defer limitsIn.Close()
limiter, err = rcmgr.NewDefaultLimiterFromJSON(limitsIn)
if err != nil {
return nil, fmt.Errorf("error parsing limit file: %w", err)