What we are doing now works, but it apparently is not the "right way" to version things for go modules. Namely, right now when we use the SDK as a dependency, we get something like this in the go mod file:
I think we need to use a v prefix on tags, and in addition, there seems to be some caveat on how go modules expects different things for v0/v1 and v2+, where the module header at the top of the go mod file would need to specify a different package for different versions, e.g.
For v0/v1:
module github.com/vapor-ware/synse-sdk
For v2
module github.com/vapor-ware/synse-sdk/v2
I'll want to test this out on another repo before causing to much churn/noise in this repo. When/if the pattern is verified to be correct, we'll probably also want to apply it to other go project repos.
https://roberto.selbach.ca/intro-to-go-modules/
What we are doing now works, but it apparently is not the "right way" to version things for go modules. Namely, right now when we use the SDK as a dependency, we get something like this in the go mod file:
where we can see other repos have the actual version pinned
I think we need to use a
v
prefix on tags, and in addition, there seems to be some caveat on how go modules expects different things for v0/v1 and v2+, where the module header at the top of the go mod file would need to specify a different package for different versions, e.g.For v0/v1:
For v2
I'll want to test this out on another repo before causing to much churn/noise in this repo. When/if the pattern is verified to be correct, we'll probably also want to apply it to other go project repos.