Last active
March 23, 2018 06:37
-
-
Save anujsinghwd/947539dc7b578a50a34c4bedea300249 to your computer and use it in GitHub Desktop.
Connecting couchbase with go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ( | |
| "github.com/couchbase/gocb" | |
| ) | |
| var bucket *gocb.Bucket | |
| func main() { | |
| cluster, _ := gocb.Connect("couchbase://localhost") | |
| cluster.Authenticate(gocb.PasswordAuthenticator{ | |
| Username: "UserName", | |
| Password: "Password", | |
| }) | |
| bucket, _ = cluster.OpenBucket("BucketName", "") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment