-
Notifications
You must be signed in to change notification settings - Fork 528
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
Fix a few lint issues #1684
Fix a few lint issues #1684
Changes from all commits
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 | ||||
---|---|---|---|---|---|---|
|
@@ -49,7 +49,7 @@ type MockClient struct { | |||||
saveBody io.ReadCloser | ||||||
} | ||||||
|
||||||
func (m *MockClient) NegotiateAPIVersion(ctx context.Context) { | ||||||
func (m *MockClient) NegotiateAPIVersion(_ context.Context) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
m.negotiated = true | ||||||
} | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -33,7 +33,7 @@ type errReader struct { | |||||
err error | ||||||
} | ||||||
|
||||||
func (r *errReader) Read(p []byte) (int, error) { | ||||||
func (r *errReader) Read(_ []byte) (int, error) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
return 0, r.err | ||||||
} | ||||||
|
||||||
|
@@ -51,7 +51,7 @@ func (m *MockClient) ImageLoad(ctx context.Context, r io.Reader, _ bool) (types. | |||||
}, m.loadErr | ||||||
} | ||||||
|
||||||
func (m *MockClient) ImageTag(ctx context.Context, source, target string) error { | ||||||
func (m *MockClient) ImageTag(ctx context.Context, _, _ string) error { | ||||||
if !m.negotiated { | ||||||
return errors.New("you forgot to call NegotiateAPIVersion before calling ImageTag") | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -227,7 +227,7 @@ type errReadCloser struct { | |||||
err error | ||||||
} | ||||||
|
||||||
func (e *errReadCloser) Read(p []byte) (int, error) { | ||||||
func (e *errReadCloser) Read(_ []byte) (int, error) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
return 0, e.err | ||||||
} | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -33,7 +33,7 @@ type mockTransport struct { | |||||
count int | ||||||
} | ||||||
|
||||||
func (t *mockTransport) RoundTrip(in *http.Request) (out *http.Response, err error) { | ||||||
func (t *mockTransport) RoundTrip(_ *http.Request) (out *http.Response, err error) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
defer func() { t.count++ }() | ||||||
if t.count < len(t.resps) { | ||||||
out = t.resps[t.count] | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.