From 9582bc319b29f238adeb87c4b1171908b2fb003a Mon Sep 17 00:00:00 2001 From: Kirtana Ashok Date: Wed, 23 Oct 2024 07:30:06 -0700 Subject: [PATCH] Fix lint errors Signed-off-by: Kirtana Ashok --- .github/workflows/ci.yml | 6 +++--- ext4/tar2ext4/tar2ext4.go | 2 +- internal/cmd/io_npipe.go | 5 ----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9933fa9aa7..355af8c47f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: - pull_request env: - GO_VERSION: "1.20.x" + GO_VERSION: "1.21.x" GOTESTSUM_VERSION: "latest" jobs: @@ -38,9 +38,9 @@ jobs: # sometimes go cache causes issues with lint cache: false - - uses: golangci/golangci-lint-action@v3 + - uses: golangci/golangci-lint-action@v6 with: - version: v1.52 + version: v1.54 args: >- --verbose --max-issues-per-linter=0 diff --git a/ext4/tar2ext4/tar2ext4.go b/ext4/tar2ext4/tar2ext4.go index 14ff66eee6..f601994139 100644 --- a/ext4/tar2ext4/tar2ext4.go +++ b/ext4/tar2ext4/tar2ext4.go @@ -148,7 +148,7 @@ func ConvertTarToExt4(r io.Reader, w io.ReadWriteSeeker, options ...Option) erro var typ uint16 switch hdr.Typeflag { - case tar.TypeReg, tar.TypeRegA: + case tar.TypeReg: typ = compactext4.S_IFREG case tar.TypeSymlink: typ = compactext4.S_IFLNK diff --git a/internal/cmd/io_npipe.go b/internal/cmd/io_npipe.go index 614f34ca29..bff77f74aa 100644 --- a/internal/cmd/io_npipe.go +++ b/internal/cmd/io_npipe.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "io" - "math/rand" "net" "sync" "syscall" @@ -20,10 +19,6 @@ import ( "golang.org/x/sys/windows" ) -func init() { - // Need to seed for the rng in backoff.NextBackoff() - rand.Seed(time.Now().UnixNano()) -} // NewNpipeIO creates connected upstream io. It is the callers responsibility to validate that `if terminal == true`, `stderr == ""`. retryTimeout // refers to the timeout used to try and reconnect to the server end of the named pipe if the connection is severed. A value of 0 for retryTimeout