Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
func retrieveUserOrders(influxClient client.Client, userID string) {
query := client.Query{
Command: fmt.Sprintf("select * from orders where user_id = '%s'", userID),
Database: "tutorial",
resp, err := influxClient.Query(query)
if err != nil {
log.Fatalf("%v", err)
log.Printf("%v", resp.Results[0].Series[0].Values[0][1].(json.Number))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.