Is there a way to use a shorter name representation/mapping in modules?
I have a project, with an url naming:
module github.com/<org>/<project>
go 1.14
Would be nice to be able to do:
import "<short_name>/<project>/package_folder"
From a go.mod, something like:
module github.com/<org>/<project> => short_name
go 1.14
Nope, there is no way to define an alias in the go.mod file.
It was proposed but rejected for reasons explained here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With