PuerkitoBio / purell

tiny Go library to normalize URLs
BSD 3-Clause "New" or "Revised" License
473 stars 58 forks source link

A problem with the "golang.org/x" packages in purell.go #26

Closed sdghchj closed 5 years ago

sdghchj commented 5 years ago

In file 'purell.go', some packages imported as: "golang.org/x/net/idna" "golang.org/x/text/unicode/norm" "golang.org/x/text/width"

however, I find their real downloading urls are: https://github.com/golang/net https://github.com/golang/text

so after I download them using 'go get' command, by default, paths '/github.com/golang/net' and '/github.com/golang/text/ are generated in my $GOPATH directory . I have to copy them into path 'golang.org/x', which is inconvenient,I think.

why not import them directly as: "github.com/golang/net/idna" "github.com/golang/text/unicode/norm" "github.com/golang/text/width" ?

mna commented 5 years ago

Hello,

No, this is the right canonical import path for those packages, see the README at https://github.com/golang/net/, or the canonical import path comment at https://github.com/golang/net/blob/master/idna/idna.go#L16.

Same for the text package (https://github.com/golang/text#downloadinstall).

Martin

sdghchj commented 5 years ago

Hello,

No, this is the right canonical import path for those packages, see the README at https://github.com/golang/net/, or the canonical import path comment at https://github.com/golang/net/blob/master/idna/idna.go#L16.

Same for the text package (https://github.com/golang/text#downloadinstall).

Martin

Ok,got it. Thank you. Maybe I known what leads to my problem. I am on a land where cannot visit golang.org. haha