Skip to content

Commit dc3a9de

Browse files
committed
update golint; fix golint new warnings
1 parent f0731b5 commit dc3a9de

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
- name: golangci-lint
1212
uses: golangci/golangci-lint-action@v3
1313
with:
14-
version: v1.53
14+
version: v1.63
1515

pkg/collection.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ func (col *CollectionHandler[K]) Refresh(ctx context.Context) error {
235235
func (col *CollectionHandler[K]) fireHTTPRequest(ctx context.Context) error {
236236
var accumulatedCollectionElements []K
237237

238+
//nolint:govet
238239
initialURL := col.client.buildURL(col.path)
239240
url := col.client.applyParams(
240241
initialURL,

pkg/serverscom.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ type Client struct {
4040

4141
KubernetesClusters KubernetesClustersService
4242

43-
token string
44-
4543
client *resty.Client
4644
}
4745

pkg/test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package serverscom
33
import (
44
"errors"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"net/http"
88
"net/http/httptest"
99
"os"
@@ -103,7 +103,7 @@ func (fs *fakeServer) WithResponseBodyStub(filename string) *fakeServer {
103103
_, currentFile, _, _ := runtime.Caller(1)
104104
stubFilePath := path.Join(path.Dir(currentFile), "..", filename)
105105

106-
stub, err := ioutil.ReadFile(stubFilePath)
106+
stub, err := os.ReadFile(stubFilePath)
107107
if err != nil {
108108
panic(fmt.Sprintf("Stub error: %q", err))
109109
}
@@ -127,7 +127,7 @@ func (fs *fakeServer) WithResponseBodyStubFile(filePath string) *fakeServer {
127127

128128
defer f.Close()
129129

130-
b, err := ioutil.ReadAll(f)
130+
b, err := io.ReadAll(f)
131131
if err != nil {
132132
panic(err)
133133
}
@@ -179,7 +179,7 @@ func (fs *fakeServer) Build() (*fakeServer, *Client) {
179179
}
180180

181181
if currentRequest.RequestBody != "" {
182-
b, err := ioutil.ReadAll(r.Body)
182+
b, err := io.ReadAll(r.Body)
183183
defer r.Body.Close()
184184
if err != nil {
185185
http.Error(w, err.Error(), 500)

0 commit comments

Comments
 (0)