The primary issue seems to be that the v3.0.0 version of iiinsomnia/yiigo
is missing the required /v3
at the end of the module
line in its go.mod
file:
https://github.com/iiinsomnia/yiigo/blob/v3.0.0/go.mod#L1
module github.com/iiinsomnia/yiigo <<<< wrong, missing required /v3 at end
go 1.12
require (
github.com/go-sql-driver/mysql v1.4.1-0.20190217072658-972a708cf979
...
That has since been corrected.
Because it is now a proper v3 module, the go get
command should include a /v3
before the @
:
module github.com/iiinsomnia/yiigo/v3@v3.2.2
From the Go modules wiki:
If the module is version v2 or higher, the major version of the module must be included as a /vN at the end of the module paths used in go.mod files (e.g., module github.com/my/mod/v2
, require github.com/my/mod/v2 v2.0.0
) and in the package import path (e.g., import "github.com/my/mod/v2/mypkg"
).
Also, it looks like a related issue was opened, with the theory being that the odd "unexpected end of JSON input" error might have come from some proxy:
https://github.com/golang/go/issues/30494