Require validation for uint64 as well as int64

This commit is contained in:
Simon Fraser 2015-08-04 14:53:45 +01:00
parent 7def1364b5
commit 7edcd7aaf5
1 changed files with 11 additions and 0 deletions

View File

@ -107,6 +107,17 @@ func (a *Accumulator) HasIntValue(measurement string) bool {
return false
}
func (a *Accumulator) HasUIntValue(measurement string) bool {
for _, p := range a.Points {
if p.Measurement == measurement {
_, ok := p.Values["value"].(uint64)
return ok
}
}
return false
}
func (a *Accumulator) HasFloatValue(measurement string) bool {
for _, p := range a.Points {
if p.Measurement == measurement {