Open callamd opened 5 days ago
Apologies that this was unclear.
That documentation is part of the go-sdk-core
a shared dependency used by multiple IBM Cloud Services. As such it is very generic and service
in that context is referring to any IBM Cloud SDK service client.
So
options := &exampleservicev1.ExampleServiceV1Options{
Authenticator: authenticator,
}
// Construct the service instance.
service, err := exampleservicev1.NewExampleServiceV1(options)
for Cloudant is:
options := &cloudantv1.CloudantV1Options{
URL: "https://YourCloudantURL.example",
Authenticator: authenticator,
}
service, err := cloudantv1.NewCloudantV1(options)
I'll chat to the folks repsonsible for that shared documentation and see if we can get some context added around it and we'll take a look at whether we can link to it in a more helpful way.
In the meantime there are specific Cloudant examples of programmatic authentication with Go available in the Cloudant API docs that you may find more useful. If you need a specific snippet we'd be happy to help too, just let us know.
The documentation is constantly referencing service without actually ever defining it.
I'd like the examples to actually show what is meant by service.
Here is an example:
from here
What? Why don't we just say what we mean? What is service? Why is it not defined? It seems pretty important.