Details
-
Bug
-
Resolution: Won't Fix
-
Critical
-
None
-
None
-
1
Description
Referring to
https://docs.couchbase.com/go-sdk/current/hello-world/start-using-sdk.html#hello-couchbase
The code sample is broken. The code sample is
func main() {
|
cluster, err := gocb.Connect(
|
"localhost",
|
gocb.ClusterOptions{
|
Username: "Administrator",
|
Password: "password",
|
})
|
if err != nil {
|
panic(err)
|
}
|
The instruction text stays
Now you have the Go client installed, open your favourite text editor and try out the following:
If a user tries they will encounter three separate issues:
1) - No package or imports
2) - Contains the variable cluster which is not used. Go does not allow unused variables
3). The brackets to not match - there is a missing trailing bracket.
We should ensure that all code samples are runnable. Or at least make it clear that this is a short snippet that will not work on its own. (I much prefer the former option)
thanks