Go packages by Fox.ONE
Before this change, we put a single go.mod file in the root directory, any project that import the library will have a lot of unnecessary dependencies.
Then we delete the global go.mod file and put go.mod in each sub-package directory, based on this, there are some points that need attention here,
- Migrate from old way, remove the
github.com/fox-one/pkgline in yourgo.modfile, then executego mod tidywill load all sub-package you imported. - No more tags like
vX.Y.Zwill be created later, according to the go mod doc, usesub-package/vX.Y.Zinstead. - When you add a new sub-package, make sure that your sub-package does not depend on
github.com/fox-one/pkg, otherwise it will lead to dependency conflict for the user.