Closed zogith closed 2 years ago
Looks like this was added in golang 1.17 https://pkg.go.dev/time#UnixMilli
Which version are you running? (run go version
)
@miguelmota what's cointop minimum golang version? Would be simple enough to use a utility function for this if <1.17
func UnixMilli(msec int64) Time {
return Unix(msec/1e3, (msec%1e3)*1e6)
}
Looks like this was added in golang 1.17 https://pkg.go.dev/time#UnixMilli
Which version are you running? (run
go version
)
go version
go version go1.13.8 linux/amd64
The current code needs go 1.17. If you don't want to build it yourself, maybe you could just use the pre-built binary?
https://github.com/cointop-sh/cointop/releases/download/v1.6.9/cointop_1.6.9_linux_amd64.tar.gz
On Xubuntu 20.04 (and presumably any other Ubuntu variant on the current LTS release) the prebuilt binary gives:
./cointop: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.32' not found (required by ./cointop)`
but installing go 1.17 on the box could be an acceptable solution.
I have installed go 1.17 using the Ubuntu "snap" package (not my first choice but I prefer this over installing from source) using the command described in https://linuxhint.com/install-go-ubuntu-2/ and then
go install github.com/cointop-sh/cointop@v1.6.9
worked for me, I now have a shiny new working cointop, thanks.
https://docs.cointop.sh/install/ mentions go 1.12 as the minimum, and references an install command syntax that will not work with go 1.17
patches welcome!
It wouldn't be too hard to use a utility version, rather than the golang 1.17 version, of UnixMilli. But only worthwhile if the project wants to support older golang, which is not my call.
@lyricnz I'm in favor of using the latest stable version of Go. I would recommend installing cointop from a package manager or using a pre-compiled binary that is available for systems where Go is not up-to-date or available.
Merged PR #301
Xubuntu 20.04 with golang-go:amd64/focal 2:1.13~1ubuntu2 uptodate installed
updating the installed compiled binary (or trying to install fresh) fails with this error, on 2 different PCs for me: