Skip to content
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

Merged
merged 1 commit into from
May 1, 2023
Merged

Fix a few lint issues #1684

merged 1 commit into from
May 1, 2023

Conversation

jonjohnsonjr
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

Codecov Report

Merging #1684 (d2feb1d) into main (43710a9) will increase coverage by 0.03%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main    #1684      +/-   ##
==========================================
+ Coverage   72.81%   72.84%   +0.03%     
==========================================
  Files         121      121              
  Lines        9633     9629       -4     
==========================================
  Hits         7014     7014              
+ Misses       1941     1939       -2     
+ Partials      678      676       -2     
Impacted Files Coverage Δ
pkg/name/registry.go 97.05% <0.00%> (-2.95%) ⬇️
pkg/crane/push.go 100.00% <100.00%> (ø)
pkg/legacy/tarball/write.go 67.96% <100.00%> (+0.78%) ⬆️
pkg/v1/remote/write.go 62.68% <100.00%> (+0.39%) ⬆️
pkg/v1/tarball/image.go 76.20% <100.00%> (ø)

Copy link
Collaborator

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to ignore these nits.

@@ -399,7 +399,7 @@ type fakeKeychain struct {
count int
}

func (k *fakeKeychain) Resolve(target Resource) (Authenticator, error) {
func (k *fakeKeychain) Resolve(_ Resource) (Authenticator, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (k *fakeKeychain) Resolve(_ Resource) (Authenticator, error) {
func (k *fakeKeychain) Resolve(Resource) (Authenticator, error) {

@@ -49,7 +49,7 @@ type MockClient struct {
saveBody io.ReadCloser
}

func (m *MockClient) NegotiateAPIVersion(ctx context.Context) {
func (m *MockClient) NegotiateAPIVersion(_ context.Context) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (m *MockClient) NegotiateAPIVersion(_ context.Context) {
func (m *MockClient) NegotiateAPIVersion(context.Context) {

@@ -33,7 +33,7 @@ type errReader struct {
err error
}

func (r *errReader) Read(p []byte) (int, error) {
func (r *errReader) Read(_ []byte) (int, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (r *errReader) Read(_ []byte) (int, error) {
func (r *errReader) Read([]byte) (int, error) {

@@ -227,7 +227,7 @@ type errReadCloser struct {
err error
}

func (e *errReadCloser) Read(p []byte) (int, error) {
func (e *errReadCloser) Read(_ []byte) (int, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (e *errReadCloser) Read(_ []byte) (int, error) {
func (e *errReadCloser) Read([]byte) (int, error) {

@@ -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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (t *mockTransport) RoundTrip(_ *http.Request) (out *http.Response, err error) {
func (t *mockTransport) RoundTrip(*http.Request) (out *http.Response, err error) {

@jonjohnsonjr jonjohnsonjr merged commit 370e8a5 into google:main May 1, 2023
18 checks passed
@jonjohnsonjr jonjohnsonjr deleted the lint branch May 1, 2023 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants