Closed eraserix closed 2 years ago
go.mod is effectively an alternative to gopkg.in, so it doesn't really make sense to do this change. Instead we should update go.mod on go-lxc and now that LXD uses gomod, we can transition to the github import path.
While trying to update to a newer version of go-lxc in my local LXD stable-4.0 branch, I noticed that the version of go-lxc is quite old. In fact, it predates the introduction of the go.mod file (even on lxd master branch)
Inside of the lxd codebase, go-lxc is imported through gopkg.in, and the library is already at v2. This should be reflected inside the go.mod file of go-lxc: It should contain the path that is actually used by users of the library. It should also contain the major version when >= v2.
Please be aware that I'm by no means an expert on go modules.
I'm able to use the library from my local stable-4.0 branch when adding the following change to go.mod: