Skip to content

Commit

Permalink
Upgrade golangci-lint to latest version (#123)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sim <[email protected]>
  • Loading branch information
ihcsim authored Aug 10, 2022
1 parent 50fd864 commit 89f3d7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: ^1.17
go-version: 1.17
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.46
version: v1.48
args: --timeout=5m --modules-download-mode=mod
4 changes: 2 additions & 2 deletions pkg/fio/fio.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"

Expand Down Expand Up @@ -189,7 +189,7 @@ func (s *fioStepper) loadConfigMap(ctx context.Context, args *RunFIOArgs) (*v1.C
}
switch {
case args.FIOJobFilepath != "":
data, err := ioutil.ReadFile(args.FIOJobFilepath)
data, err := os.ReadFile(args.FIOJobFilepath)
if err != nil {
return nil, errors.Wrap(err, "File reading error")
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/fio/fio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"testing"

Expand Down Expand Up @@ -382,7 +381,7 @@ func (s *FIOTestSuite) TestValidateNamespace(c *C) {

func (s *FIOTestSuite) TestLoadConfigMap(c *C) {
ctx := context.Background()
file, err := ioutil.TempFile("", "tempTLCfile")
file, err := os.CreateTemp("", "tempTLCfile")
c.Check(err, IsNil)
defer os.Remove(file.Name())
for i, tc := range []struct {
Expand Down

0 comments on commit 89f3d7b

Please sign in to comment.