Not able to install couchbase go sdk


machine os - CentOS 7
I need to download specific commit for gocb.v1.
For that I have to export GO111MODULE=0n.
but when I am trying to download the gocb package, error is occured:
$ echo GO111MODULE on go get

go build no Go files in

Please help and guide.


Hi @aditimittal15 what version of Go are you using? I’ve just created a new centos7 VM and installed Go 1.13 on it, everything seems to look good when I do the following (outside of the GOPATH, so modules are already enabled):

$ go mod init test
go: creating new go.mod: module test
$ go get
go: finding d46732ea85f0ca44f82842ca2996bd2a21995172
go: finding d46732ea85f0ca44f82842ca2996bd2a21995172
go: downloading v1.6.1
go: extracting v1.6.1
go: finding v1.1.1
go: finding v1.0.4
go: finding v1.0.0
go: finding v1.1.0
go: finding v7.1.17
go: downloading v1.1.1
go: downloading v1.1.0
go: downloading v1.0.4
go: downloading v1.0.0
go: downloading v7.1.17
go: extracting v1.1.1
go: extracting v1.1.0
go: extracting v1.0.0
go: extracting v1.0.4
go: extracting v7.1.17
go: finding v0.0.1
go: finding latest
go: downloading v0.0.1
go: downloading v0.0.0-20200506145744-7e3656a0809f
go: extracting v0.0.1
go: extracting v0.0.0-20200506145744-7e3656a0809f
go: downloading v0.3.0
go: extracting v0.3.0
go: finding v0.3.0 

Afterward in my go.mod I see

module test

go 1.13

require ( v0.0.1 // indirect v1.1.1 // indirect v1.1.0 // indirect v0.0.0-20200506145744-7e3656a0809f // indirect v1.6.1 // indirect v7.1.17 // indirect v1.0.4 // indirect v1.0.0 // indirect

(v1.6.1 corresponds to the SHA that you’re using)

Thanks for the response… This issue was with go version 1.12.
Issue resolved with 1.13 or higher versions