Skip to content

Commit

Permalink
Create a Point from a models.Point
Browse files Browse the repository at this point in the history
  • Loading branch information
e-dard committed Mar 14, 2016
1 parent 1d2c1fa commit 207bafa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/v2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ func (p *Point) Fields() map[string]interface{} {
return p.pt.Fields()
}

// NewPointFrom returns a point from the provided models.Point.
func NewPointFrom(pt models.Point) *Point {
return &Point{pt: pt}
}

func (uc *udpclient) Write(bp BatchPoints) error {
var b bytes.Buffer
var d time.Duration
Expand Down

0 comments on commit 207bafa

Please sign in to comment.