Update Client documentation

* Added additional variable to fulfil NewUDPClient function requirement (there was one instead of 2) and it caused multiple-value client.NewUDPClient() in single-value context error

* Update README.md

Added error handling.
pull/7637/head
DanKans 2016-12-01 18:18:28 +00:00 committed by Edd Robinson
parent 7106c8a9c9
commit e0291e419b
1 changed files with 5 additions and 2 deletions

View File

@ -230,8 +230,11 @@ The **InfluxDB** client also supports writing over UDP.
```go
func WriteUDP() {
// Make client
c := client.NewUDPClient("localhost:8089")
c, err := client.NewUDPClient("localhost:8089")
if err != nil {
panic(err.Error())
}
// Create a new point batch
bp, _ := client.NewBatchPoints(client.BatchPointsConfig{
Precision: "s",