Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Upgrade to go 1.14 and go.mod #329

Merged
merged 2 commits into from
Apr 10, 2020
Merged

Upgrade to go 1.14 and go.mod #329

merged 2 commits into from
Apr 10, 2020

Conversation

antechrestos
Copy link
Contributor

Stuck at home due to covid restriction, I finally got time to wrote this contribution 😏

Copy link
Contributor

@nkubala nkubala left a comment

Choose a reason for hiding this comment

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

@antechrestos thanks for digging into this one! it's long overdue :)

not sure I understand why we moved cmd/ to cmd/container-diff/cmd. this makes the import statements look very strange...

"github.com/GoogleContainerTools/container-diff/cmd/container-diff/cmd/util/output"

@antechrestos
Copy link
Contributor Author

@nkubala My bad. I've just pushed a new version.
I based my work on what I saw on other projects layout and on this article

@nkubala
Copy link
Contributor

nkubala commented Apr 2, 2020

@antechrestos ah makes sense I see what you were doing. yeah this is more in line with what we do in https://github.com/GoogleContainerTools/skaffold - code related to the actual commands goes in cmd/skaffold, and the actual business logic (like 90% of the code) lives in pkg/skaffold. this project was created way back before I knew about best practices around go project structure 😄

I'm wondering...would you be willing to try and split some code out into cmd/container-diff and pkg/container-diff to clean things up a bit? that would go a long way towards future contributions - I think the code as is right now is a bit hard to follow and would be more approachable that way. totally understand if this is more than you want to take on right now, but I figured I'd ask 😃 my team isn't going to be able to prioritize it any time soon.

either way, I'd love if you could split out any refactors into a separate PR so we can get the restructure/naming right there. then this PR will be just go 1.14 related stuff and I'm happy to merge it!

thanks for giving this project a little bit of love 🙏

@antechrestos
Copy link
Contributor Author

@nkubala would you agree doing the contrary: forget any renaming / move of this MR and just go to go 1.14 and go mod then I can clean things?

It would allow us to benefit go module. Then I can start cleaning things.

If you agree, this merge requests only contains changes relative to upgrading to go 1.14

@nkubala
Copy link
Contributor

nkubala commented Apr 6, 2020

@antechrestos yep that sounds good to me!

This change was done by running the command

* go mod init github.com/GoogleContainerTools/container-diff
* go mod tidy
* rm -rf vendor && go mod vendor

See #328
@antechrestos
Copy link
Contributor Author

@nkubala I've rework my branch to split the migration to golang 1.4 in one commit and the go module one to another commit. This branch does not brings any other change but these one.

Copy link
Contributor

@nkubala nkubala left a comment

Choose a reason for hiding this comment

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

this builds locally for me and LGTM, @antechrestos thanks so much for taking the time to do this!

@nkubala nkubala merged commit 2f11d9b into GoogleContainerTools:master Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants