From 003cebf7c9a6ce33fa872727b185b02f40e065f4 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Mon, 18 Dec 2023 10:22:20 +0000 Subject: [PATCH 1/3] update golangci-lint to 1.55.2 --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fdcf7f151..b9b27bfe4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - name: Install Requirements run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.1 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 make dep chmod +x ./ci_scripts/create-ip-aliases.sh ./ci_scripts/create-ip-aliases.sh @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v3 - name: Install Requirements run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.1 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 make dep chmod +x ./ci_scripts/create-ip-aliases.sh ./ci_scripts/create-ip-aliases.sh @@ -49,7 +49,7 @@ jobs: - name: Install Requirements run: | choco install make - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.1 + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 make dep - name: Testing run: | From f4291e677d47fc67fea1bbb559b5624f0b267589 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Mon, 18 Dec 2023 10:22:48 +0000 Subject: [PATCH 2/3] remove depguard from linting list, because of its conflict with golangci-lint --- .golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 8426bc183..a34efe312 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -163,7 +163,6 @@ linters: - megacheck - misspell - nakedret - - depguard enable-all: false disable-all: true presets: From a222887f7862d5f8dced01da483ac98c669cd8d4 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Mon, 18 Dec 2023 10:29:35 +0000 Subject: [PATCH 3/3] move from ioutil to os.WriteFile for dmsghttp command --- cmd/skywire-cli/commands/dmsghttp/root.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/skywire-cli/commands/dmsghttp/root.go b/cmd/skywire-cli/commands/dmsghttp/root.go index b27373057..504e715ea 100644 --- a/cmd/skywire-cli/commands/dmsghttp/root.go +++ b/cmd/skywire-cli/commands/dmsghttp/root.go @@ -5,7 +5,6 @@ import ( "context" "encoding/json" "io" - "io/ioutil" "net/http" "os" @@ -53,7 +52,7 @@ var dmsghttpCmd = &cobra.Command{ log.WithError(err).Error("Error accurs during marshal content to json file") } - err = ioutil.WriteFile(path, file, 0600) + err = os.WriteFile(path, file, 0600) if err != nil { log.WithError(err).Errorf("Cannot save new dmsghttp-config.json file at %s", path) }