apenella / go-ansible

Go-ansible is a Go package that enables the execution of ansible-playbook or ansible commands directly from Golang applications. It supports a wide range of options for each command, enabling smooth integration of Ansible functionality into your projects.
MIT License
905 stars 143 forks source link

cannot use go get v2 #141

Closed lingxiao26 closed 8 months ago

lingxiao26 commented 8 months ago

go get github.com/apenella/go-ansible@v2.0.0-rc.1

outpupt: go: github.com/apenella/go-ansible@v2.0.0-rc.1: invalid version: module contains a go.mod file, so module path must match major version ("github.com/apenella/go-ansible/v2")

apenella commented 8 months ago

Hi @lingxiao26! Thanks for pointing that out. I was not aware that Go forces you to rename the package name when you change to a major version v2 or higher. https://go.dev/wiki/Modules#semantic-import-versioning I am already working on that in #142 to solve the issue. Meanwhile, you can use the v1.3.0. I hope to have everything ready in a couple of days.

lingxiao26 commented 8 months ago

Hi @lingxiao26! Thanks for pointing that out. I was not aware that Go forces you to rename the package name when you change to a major version v2 or higher. https://go.dev/wiki/Modules#semantic-import-versioning I am already working on that in #142 to solve the issue. Meanwhile, you can use the v1.3.0. I hope to have everything ready in a couple of days.

“Thanks for the update! I appreciate your efforts in resolving the issue. I will continue using v1.3.0 for now and look forward to the upcoming changes in a couple of days.”

apenella commented 8 months ago

@lingxiao26 It should be already solved! I need to rename the module name to github.com/apenella/go-ansible/v2.

$ go get github.com/apenella/go-ansible/v2@v2.0.0-rc.2
go: downloading github.com/apenella/go-ansible/v2 v2.0.0-rc.2

Thanks again for raising that issue :)