From 3622e6deb6197d37e99aa87ec800be98b8e60b50 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:23:38 -0400 Subject: [PATCH 1/3] Change go version to be `stable` in test CI --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48e2c476a..a216c4b49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.18' + go-version: 'stable' - run: go version - name: Run tidy run: make tidy From a55854c0f464d3c8d34706869c6895e11c9cdb92 Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Mon, 14 Aug 2023 12:03:25 -0400 Subject: [PATCH 2/3] fix linter --- .golangci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index abdc2337b..093ed1f79 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -36,6 +36,9 @@ linters: - nosnakecase #################### + # workaround to avoid linter failures of getting malformed json + - musttag + - bodyclose - contextcheck - nilerr From 46a8ad06e974a96656aa4589883040bdf71cb759 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang Date: Mon, 14 Aug 2023 14:24:02 -0400 Subject: [PATCH 3/3] `go fmt` and disable `nolintlint` --- .golangci.yml | 3 +++ pagination.go | 2 +- waitfor.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 093ed1f79..955da7862 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -36,6 +36,9 @@ linters: - nosnakecase #################### + # conflicted with go fmt + - nolintlint + # workaround to avoid linter failures of getting malformed json - musttag diff --git a/pagination.go b/pagination.go index 0d5dff6bc..608985d60 100644 --- a/pagination.go +++ b/pagination.go @@ -23,7 +23,7 @@ type PageOptions struct { } // ListOptions are the pagination and filtering (TODO) parameters for endpoints -//nolint +// nolint type ListOptions struct { *PageOptions PageSize int `json:"page_size"` diff --git a/waitfor.go b/waitfor.go index 8485d50d6..649554b4f 100644 --- a/waitfor.go +++ b/waitfor.go @@ -275,7 +275,7 @@ func (client Client) WaitForLKEClusterConditions( // WaitForEventFinished waits for an entity action to reach the 'finished' state // before returning. It will timeout with an error after timeoutSeconds. // If the event indicates a failure both the failed event and the error will be returned. -//nolint +// nolint func (client Client) WaitForEventFinished( ctx context.Context, id any,