Closed sando38 closed 1 year ago
As I know almost nothing about Go, this is just a small attempt to get it working. I committed a fix to my fork. Once we are sure it solves the problem, I'll merge upstream.
Try this:
$ go install -v github.com/badlop/ejabberd-api/cmd/ejabberd@update-go
go: downloading github.com/badlop/ejabberd-api v0.0.0-20230612203344-1349c06e046b
go: finding module for package github.com/processone/ejabberd-api
go: finding module for package github.com/alecthomas/kingpin/v2
go: downloading github.com/alecthomas/kingpin/v2 v2.3.2
go: downloading github.com/alecthomas/kingpin v2.2.6+incompatible
go: downloading github.com/processone/ejabberd-api v0.0.0-20210707155731-b02bcbec4fa9
go: found github.com/alecthomas/kingpin/v2 in github.com/alecthomas/kingpin/v2 v2.3.2
go: found github.com/processone/ejabberd-api in github.com/processone/ejabberd-api v0.0.0-20210707155731-b02bcbec4fa9
go: downloading github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
go: downloading github.com/xhit/go-str2duration/v2 v2.1.0
github.com/badlop/ejabberd-api/cmd/ejabberd
...
$ $GOPATH/bin/ejabberd
usage: ejabberd [<flags>] <command> [<args> ...]
A command-line front-end for ejabberd server API.
...
Seems to work, tested with 1.18 and 1.20. Thanks for checking that quickly.
How to reproduce:
e.g. with Docker:
Error msg:
go vsn
1.17
worksOutput: