Golang Multi-Modules Repositories

In order to support centralized golang library, we will implement all packages inside a single repository. Each package is independent, so it will have its own go.mod file and its own version. Here are some important notes

  1. For V0 or V1: github.com/username/repository/pkg/path with pkg/path/v1.X.Y tag.
  2. For V2 or higher: github.com/username/repository/pkg/path/v2 with pkg/path/v2.Y.Z tag.
    1. We can not use major branch version upgrade.
    2. It's safe to directly move all to /vX directory if we are not supporting old version.
  3. If no tag: will use golang proto-version (as usual).

Sample git-log (git log --oneline --reverse)


4dfa908                     docs(main): first commit
279410e (tag: a/v1.0.0)     feat(a): initial SDK implementation
a4af2d9 (tag: b/v1.0.0)     feat(b): initial SDK implementation
a44e3e3 (tag: a/v1.1.0)     feat(a): add new API
94da87d (tag: pkg/c/v1.0.0) feat(pkg/c): initial SDK implementation
7622b4a                     feat(pkg/d): initial SDK implementation
202d06d (tag: v1.0.0)       feat(main): initial implementation
ffb8d24 (tag: v1.1.0)       feat(main): change package b from replace to require
1c3bdc1 (tag: v1.2.0)       feat(main): import package pkg/d using replace
a24f658 (tag: a/v2.0.0)     feat(a)!: change API signature
22e188d (tag: b/v2.0.0)     feat(b)!: change API signature
413c025                     chore(main): add gitignore

Source