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
parent
7106c8a9c9
commit
e0291e419b
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue