paultag / go-debian

debian golang support library
https://pault.ag/go/debian
Other
81 stars 33 forks source link

Document the correct import path in README.md #99

Closed michael-schaller closed 5 years ago

michael-schaller commented 6 years ago

It isn't documented that one has to use pault.ag/go/debian and can't use github.com/paultag/go-debian as alternative. This should be documented in README.md.

$ go get pault.ag/go/debian/control && echo OK || echo FAIL
OK
$ go get github.com/paultag/go-debian/control && echo OK || echo FAIL
../github.com/paultag/go-debian/control/changes.go:33:2: use of internal package not allowed
FAIL

Alternatively it might be worth to just get rid of the internal package or to make it public.

stapelberg commented 6 years ago

Thanks for filing this. We could also use an import comment so that the Go tool will print an appropriate error: https://golang.org/cmd/go/#hdr-Import_path_checking

michael-schaller commented 5 years ago

According to that link the import path comment will be ignored in case modules are used. So should an import path comment and a go.mod be added?

stapelberg commented 5 years ago

Added the import comments and sent a PR for the module so that @paultag can confirm there’s nothing speaking against that :)

paultag commented 5 years ago

Merged, thanks! I'm unsure of a few things, but this is a step forward, thank you all!

michael-schaller commented 5 years ago

Thanks. How about Go modules? Currently module support still needs to be enabled on demand but I have the feeling module support is here to stay. The import comments will be ignored by the module support though and so the question remains if a go.mod file should be added. I can also open a new bug for this...

stapelberg commented 5 years ago

We have already added the Go module support, see PR #100

michael-schaller commented 5 years ago

Ah. I've missed that. Thanks!