Skip to content

Consider tagging submodule "pkg/apis"?

I found that package github.com/rancher/system-upgrade-controller/pkg/apis/upgrade.cattle.io/v1 is placed in submodule github.com/rancher/system-upgrade-controller/pkg/apis instead of root module.
However, it seems that submodule github.com/rancher/system-upgrade-controller/pkg/apis is not tagged. According to Go Modules wiki, submodule should be tagged like relative-path-to-root/vX.X.X. At now, when trying to import package github.com/rancher/system-upgrade-controller/pkg/apis/upgrade.cattle.io/v1, downstream would depends on pseudo-version of module github.com/rancher/system-upgrade-controller/pkg/apis.

github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20210727200656-10b094e30007

I think it is not very readable and difficult to upgrade. This is not conductive to version control either. So, I propose whether it is possible to tag submodule properly. For example, pkg/apis/v0.0.1, pkg/apis/v0.10.0etc, so that other project can use tag to import this module in go.mod.