Skip to content

Conversation

@opjt
Copy link
Contributor

@opjt opjt commented Nov 23, 2025

Greetings

This is my first contribution to the project. Thank you for maintaining such a high-quality codebase and for the opportunity to participate. I hope to continue contributing to other areas of the project going forward.

Summary

While running make fix, I encountered a lint issue reported by revive regarding duplicated conditional branches in getUserAndGroup. To address this, I refactored the conditional logic to eliminate the duplicated else if branch without changing the function's behavior.

What was changed

Split the duplicated else if into an independent if statement.

No functional change; only improves readability and resolves the lint warning.

Thank you

Thank you in advance for reviewing this change, and please let me know if any adjustments are needed.

Signed-off-by: Park jungtae <jtpark1957@gmail.com>
@AkihiroSuda AkihiroSuda added this to the v2.2.1 (?) milestone Nov 24, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit ce62cfc into containerd:main Nov 24, 2025
36 checks passed
@AkihiroSuda
Copy link
Member

lint

Can we enable it in https://github.com/containerd/nerdctl/blob/main/.golangci.yml

@opjt
Copy link
Contributor Author

opjt commented Nov 24, 2025

@AkihiroSuda

lint

Can we enable it in https://github.com/containerd/nerdctl/blob/main/.golangci.yml

Sorry about that.
It turns out the issue was caused by me using a newer version of golangci-lint.
After switching to the version specified in the Makefile (golangci-lint 2.4.0), the lint warnings disappeared.

# my golangci-lint version
golangci-lint version                                                                                                                                                      
golangci-lint has version 2.6.2 built with go1.25.4 from dc16cf4 on 2025-11-14T02:47:46Z

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.

2 participants