-
Notifications
You must be signed in to change notification settings - Fork 96
fix: lint #665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: lint #665
Changes from 13 commits
2050798
28406a0
8fcfc55
9a4185e
87f32ae
b17d967
d441b11
9f50b7a
b7bb2bb
8416602
c7cedf9
db93794
b5d32fd
8c1f0ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // Package assert provides assertion functionality for KUTTL test harness. | ||
| package assert | ||
|
|
||
| import ( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // Package harness provides the main test harness functionality for KUTTL. | ||
| package harness | ||
|
|
||
| import ( | ||
|
|
@@ -288,7 +289,7 @@ func (h *Harness) Config() (*rest.Config, error) { | |
| return nil, err | ||
| } | ||
|
|
||
| defer f.Close() | ||
| defer f.Close() //nolint:errcheck | ||
|
||
|
|
||
| return h.config, kubernetes.Kubeconfig(h.config, f) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| package http | ||
| // Package http provides HTTP client functionality for downloading files and making requests. | ||
| package http //nolint:revive,nolintlint // apparently nolintlint is confused | ||
|
|
||
| import ( | ||
| "bytes" | ||
|
|
@@ -33,7 +34,7 @@ func (c *Client) Get(url string) (*http.Response, error) { | |
| return resp, err | ||
| } | ||
|
|
||
| // Get performs HTTP get, retrieves the contents and returns a bytes.Buffer of the entire contents | ||
| // GetByteBuffer performs HTTP get, retrieves the contents and returns a bytes.Buffer of the entire contents | ||
| // this could be dangerous against an extremely large file | ||
| func (c *Client) GetByteBuffer(url string) (*bytes.Buffer, error) { | ||
| buf := bytes.NewBuffer(nil) | ||
|
|
@@ -71,7 +72,7 @@ func (c *Client) Download(url string, path string) error { | |
| if err != nil { | ||
| return err | ||
| } | ||
| defer resp.Body.Close() | ||
| defer resp.Body.Close() //nolint:errcheck | ||
|
|
||
| _, err = os.Stat(path) | ||
| if err == nil || os.IsExist(err) { | ||
|
|
@@ -88,7 +89,7 @@ func (c *Client) Download(url string, path string) error { | |
| if err != nil { | ||
| return err | ||
| } | ||
| defer out.Close() | ||
| defer out.Close() //nolint:errcheck | ||
|
||
|
|
||
| // Create our bytes counter and pass it to be used alongside our writer | ||
| counter := &writeCounter{Name: filepath.Base(path)} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| package http | ||
| package http //nolint:revive,nolintlint // apparently nolintlint is confused | ||
|
|
||
| import ( | ||
| "bytes" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| package http | ||
| package http //nolint:revive,nolintlint // apparently nolintlint is confused | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| // Package fake provides fake Kubernetes client implementations for testing. | ||
| package fake | ||
|
|
||
| import "testing" | ||
|
|
||
| // TestDummy is a no-op test to satisfy coverage tools | ||
| func TestDummy(t *testing.T) { | ||
| func TestDummy(_ *testing.T) { | ||
| // This test exists only to ensure the package is recognized by go test | ||
| // and to avoid "go: no such tool 'covdata'" warnings | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.