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

update go.mod & main.go errors #4

Merged
merged 3 commits into from
Jan 22, 2020

Conversation

kikisdeliveryservice
Copy link
Member

@kikisdeliveryservice kikisdeliveryservice commented Jan 22, 2020

Update: So I think this go.mod hadnt been updated since it moved from andrew's repo over here.

so I made a fresh go.mod, fixed some import errors in main.go and fixed a go fmt missing operand.

also renamed the (incorrectly named) ign2to3 to ignconverter

@arithx
Copy link
Contributor

arithx commented Jan 22, 2020

Notably the top level files do specify the package name as ign2to3, is this tested?

@kikisdeliveryservice
Copy link
Member Author

Just to clarify:

importing github.com/coreos/ign-converter :

$ make go-deps
go mod tidy
go: finding github.com/coreos/ign-converter latest
go: github.com/coreos/ign-converter@v0.0.0-20200117071129-cfed8ca7a6b4: parsing go.mod: unexpected module path "github.com/coreos/ign2to3"
go: error loading module requirements
make: *** [Makefile:60: go-deps] Error 1

No problem so I import github.com/coreos/ign2to3 :
I get no changes whatsoever to my go.sum (even tho i should!!)

importing `github.com/coreos/ign-converter/ign2to3 : pulls in some stuff/updates my go.sum

I think that this is a relic from when the repo was called ign2to3? if module path was correct as github.com/coreos/ign2to3 then should be able to import using that..

@bgilbert @jlebon sanity check please? go.mod is confusing

@jlebon
Copy link
Member

jlebon commented Jan 22, 2020

I'm not a golang expert by any means, but yeah it'd be less confusing to just match the package name with the module name and the repo name.

@kikisdeliveryservice
Copy link
Member Author

kikisdeliveryservice commented Jan 22, 2020

Ok so i redid the go.mod file which hadn't been updated in a long time. I'm unsure what this main.go function is, but it had some problems even running go build ie import issues and golang error, which i also fixed.

Unit tests still pass as well.

@kikisdeliveryservice kikisdeliveryservice changed the title fix go.mod module path update go.mod & main.go errors Jan 22, 2020
@kikisdeliveryservice kikisdeliveryservice changed the title update go.mod & main.go errors [WIP] update go.mod & main.go errors Jan 22, 2020
@kikisdeliveryservice
Copy link
Member Author

cc: @yuqi-zhang

Copy link
Contributor

@arithx arithx left a comment

Choose a reason for hiding this comment

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

2 minors but otherwise LGTM

internal/main.go Outdated Show resolved Hide resolved
internal/main.go Show resolved Hide resolved
also update ign2to3 pkg name to ignconverter, since it does more than 2to3
update dependencies and remove stale ones
@kikisdeliveryservice kikisdeliveryservice changed the title [WIP] update go.mod & main.go errors update go.mod & main.go errors Jan 22, 2020
Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

LGTM

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

4 participants