Skip to content

Commit

Permalink
Merge pull request #200 from oskarwojciski/readme_fix
Browse files Browse the repository at this point in the history
feat: Unify type of max field in example
  • Loading branch information
vlastahajek committed Sep 30, 2020
2 parents f33d198 + 38688e6 commit 771b3f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Documentation
1. [#189](https://github.com/influxdata/influxdb-client-go/pull/189) Added clarification that server URL has to be the InfluxDB server base URL to API docs and all examples.
1. [#196](https://github.com/influxdata/influxdb-client-go/pull/196) Changed default server port 9999 to 8086 in docs and examples
1. [#200](https://github.com/influxdata/influxdb-client-go/pull/200) Fix example code in the Readme

## 2.0.1 [2020-08-14]
### Bug fixes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ func main() {
// Create point using full params constructor
p := influxdb2.NewPoint("stat",
map[string]string{"unit": "temperature"},
map[string]interface{}{"avg": 24.5, "max": 45},
map[string]interface{}{"avg": 24.5, "max": 45.0},
time.Now())
// write point immediately
writeAPI.WritePoint(context.Background(), p)
// Create point using fluent style
p = influxdb2.NewPointWithMeasurement("stat").
AddTag("unit", "temperature").
AddField("avg", 23.2).
AddField("max", 45).
AddField("max", 45.0).
SetTime(time.Now())
writeAPI.WritePoint(context.Background(), p)

Expand Down

0 comments on commit 771b3f2

Please sign in to comment.