Hacker News new | past | comments | ask | show | jobs | submit login

Go does not map the module path directly to a file system path. You can import v1 and v2 at the same time because they have different module names. In other words, this is allowed:

  $ go get github.com/linkedin/goavro@v1.0.5
  $ go get github.com/linkedin/goavro/v2@v2.10.1
Then:

  $ go list -m ... | grep goavro
  github.com/linkedin/goavro v1.0.5
  github.com/linkedin/goavro/v2 v2.10.1
Version 1 has a go.mod that declares:

  module github.com/linkedin/goavro
and version 2 has a go.mod that declares:

  module github.com/linkedin/goavro/v2
but both have their Go files located in the root of the repository.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: