Skip to content

Commit

Permalink
update for influxdb.models.NewPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielc committed Oct 28, 2015
1 parent 6142b3f commit e1cd392
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/point.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ type Point struct {

// Returns byte array of a line protocol representation of the point
func (p Point) Bytes(precision string) []byte {
mp := models.NewPoint(
mp, err := models.NewPoint(
p.Name,
p.Tags,
map[string]interface{}(p.Fields),
p.Time,
)
if err != nil {
panic(err)
}

return []byte(mp.PrecisionString(precision))
}
Expand Down

0 comments on commit e1cd392

Please sign in to comment.