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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot use go get v2

lingxiao26 opened this issue · comments

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")

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.

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.”

@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 :)