Goid icon indicating copy to clipboard operation
Goid copied to clipboard

module paths should all be lower case

Open KateGo520 opened this issue 4 years ago • 5 comments

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:

  1. Rename the module path to "github.com/JakeHL/Goid": https://github.com/JakeHL/Goid/blob/master/go.mod#L1
module github.com/JakeHL/Goid
  1. Change the doc document to use import "github.com/jakehl/goid".

KateGo520 avatar Jul 31 '20 09:07 KateGo520

@JakeHL Could you help me review this issue? Thx :p

KateGo520 avatar Jul 31 '20 09:07 KateGo520

More idiomatically, the repo path should be the lowercase version.

fgm avatar Apr 08 '22 09:04 fgm

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.

jakenvac avatar Apr 08 '22 10:04 jakenvac

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 ?

fgm avatar Apr 11 '22 07:04 fgm

I think the idiomatic approach would be best. people build habbits around idioms 👍

jakenvac avatar Apr 11 '22 09:04 jakenvac