> I thought it infers the name from the last part of the URL if it's not prefixed with an alias.
The name and the last part of the url are unrelated.
They're only usually the same by convention. For example:
import (
"fmt"
"github.com/dimuska139/go-email-normalizer"
)
func main() {
fmt.Println(emailnormalizer.NewNormalizer().Normalize("[email protected]"))
}
The reason that I use "go-email-normalizer" as "emailnormalizer" is entirely unrelated to the url it's at or the name of the repo it's in. The only reason you use "emailnormalizer" is because that's the package line in all the files in that package: https://github.com/dimuska139/go-email-normalizer/blob/0432b...Importing a go package will add an arbitrary identifier to the file scope, and you can't know that identifier without reading the package statement of the package you imported.
Here you go:
https://blog.golang.org/using-go-modules
Your v5 question should be answered by "part 4":
Later in the code there is a line like
but how does golang it know it's referring to the dbus package if there's a v5 at the end? I thought it infers the name from the last part of the URL if it's not prefixed with an alias.Sorry if this is a stupid question.