i have this
package main
import (
"fmt"
//"github.com/golang/glog"
//"strconv"
"time"
"gopkg.in/couchbaselabs/gocb.v0"
//"github.com/couchbase/go-couchbase"
)
func main() {
callCouchbase("10.0.30.98:8092", "power", "d3v3nv" )
}
func callCouchbase(connection string, bucket string, password string) {
connection_string := “couchbase://” + connection
var err error
fmt.Println(“Opening connection to couchbase at: %s\n”, connection_string)
cluster, err = gocb.Connect(connection_string)
if(err != nil) {
fmt.Println("Unable to make connection to Couchbase server...")
}
fmt.Println("Opening couchbase bucket: %s with password: %s", bucket, password)
Couchbase, err = cluster.OpenBucket(bucket, password)
if(err != nil) {
panic(err)
} else {
fmt.Println(err, "Connected...")
}
}
when i run it i get
Opening connection to couchbase at: %s
couchbase://10.0.30.98:8092
Opening couchbase bucket: %s with password: %s power d3v3nv
panic: Failed to connect to all specified hosts.
goroutine 1 [running]:
main.callCouchbase(0x7736d0, 0xf, 0x7846f0, 0xe, 0x769170, 0x6)
/root/go/src/test/test.go:47 +0x54c
main.main()
/root/go/src/test/test.go:27 +0x60
I am pulling my hair out . Thanks for the help.