Update client README - close client resources
parent
10a7ffb647
commit
fd3156e4c1
|
@ -72,7 +72,8 @@ func main() {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
defer c.Close()
|
||||
|
||||
// Create a new point batch
|
||||
bp, err := client.NewBatchPoints(client.BatchPointsConfig{
|
||||
Database: MyDB,
|
||||
|
@ -100,6 +101,11 @@ func main() {
|
|||
if err := c.Write(bp); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// Close client resources
|
||||
if err := c.Close(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue