// Prepare the client's configuration based on the host and the authentication above.currentConfig :=lenses.ClientConfig{Host:"domain.com", Authentication: auth, Timeout:"15s", Debug:true}// Creating the client using the configuration.client, err :=lenses.OpenConnection(currentConfig)if err != nil {// handle error.}
Usage
All lenses-go#Client methods return a typed value based on the call and an error as second output to catch any errors coming from backend or client, forget panics.
topics, err :=client.GetTopics()if err != nil {// handle error.}// Print the length of the topics we've just received from our Lenses Box.print(len(topics))