Goid
Goid copied to clipboard
module paths should all be lower case
Background
Module path is inconsistent with go import path. GO111MODULE=on, as doc said, import "github.com/JakeHL/Goid", then get this error:
go: finding module for package github.com/JakeHL/Goid
go: downloading github.com/JakeHL/Goid v1.1.0
go: found github.com/JakeHL/Goid in github.com/JakeHL/Goid v1.1.0
go: test1 imports
github.com/JakeHL/Goid: github.com/JakeHL/[email protected]: parsing go.mod:
module declares its path as: github.com/jakehl/goid
but was required as: github.com/JakeHL/Goid
Solution
Fix the module path:
- Rename the module path to "github.com/JakeHL/Goid": https://github.com/JakeHL/Goid/blob/master/go.mod#L1
module github.com/JakeHL/Goid
- Change the doc document to use
import "github.com/jakehl/goid"
.
@JakeHL Could you help me review this issue? Thx :p
More idiomatically, the repo path should be the lowercase version.
hey sorry, I've not touched this project in a little while and my go is a little Rusty. feel free to submit a PR or i can take a look later.
Hi @JakeHL thanks for considering the issue. Do you want it to go apply to the renamed repo, or to the existing non-idiomatic mixed-case repo name ?
I think the idiomatic approach would be best. people build habbits around idioms 👍