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

Add unused references to go modules in the import section. #299

Merged
merged 1 commit into from Apr 26, 2023

Conversation

bpradipt
Copy link
Contributor

This is to ensure that the modules are in go.mod and hence can be cached by downstream builds. This also ensures that running go mod tidy will not remove these modules as these are not used in the code. This improves upon the PR-294 fix as it was an incomplete fix and didn't include all the required deps.

Adding unused references to go modules in the import section.  This is
to ensure that the modules are in go.mod and hence can be cached by
downstream builds.  This also ensures that running `go mod tidy` will
not remove these modules as these are not used in the code.
This improves upon the PR-294 fix as it was an incomplete fix and
didn't include all the required deps.

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Copy link
Member

@gkurz gkurz left a comment

Choose a reason for hiding this comment

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

LGTM and go mod tidy doesn't remove anything (while it does remove cobra and controller-tools if I drop the changes in main.go). So it seems to be working as expected.

Thanks @bpradipt !

Copy link
Contributor

@cpmeadors cpmeadors left a comment

Choose a reason for hiding this comment

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

Tested with:
go clean -modcache
go mod download
go run sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."

No additional mod were downloaded and command was successful. Versions looks good to based on all the slack conversations.

@cpmeadors cpmeadors merged commit 133aa85 into openshift:peer-pods-tech-preview Apr 26, 2023
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