Skip to content

Instantly share code, notes, and snippets.

@akhenakh
Created October 28, 2014 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhenakh/81bf3a635e20fd376ac0 to your computer and use it in GitHub Desktop.
Save akhenakh/81bf3a635e20fd376ac0 to your computer and use it in GitHub Desktop.
Test influxDB connection
package main
import (
"fmt"
"github.com/influxdb/influxdb/client"
)
func main() {
c, err := client.NewClient(&client.ClientConfig{
Username: "root",
Password: "root",
Database: "test",
})
if err != nil {
panic(err)
}
dbs, err := c.GetDatabaseList()
if err != nil {
panic(err)
}
fmt.Println(dbs)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment