Skip to content

Commit

Permalink
Merge pull request rcrowley#190 from rcrowley/samplesnapshot_constructor
Browse files Browse the repository at this point in the history
[fixes rcrowley#188] expose a constructor for SampleSnapshot
  • Loading branch information
mihasya authored Nov 28, 2016
2 parents 51b876f + 1df74d5 commit 550432d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,13 @@ type SampleSnapshot struct {
values []int64
}

func NewSampleSnapshot(count int64, values []int64) *SampleSnapshot {
return &SampleSnapshot{
count: count,
values: values,
}
}

// Clear panics.
func (*SampleSnapshot) Clear() {
panic("Clear called on a SampleSnapshot")
Expand Down

0 comments on commit 550432d

Please sign in to comment.