Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Commit

Permalink
more renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao Wang committed May 19, 2017
1 parent 2aa2ead commit ee49c04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions policy/aggregation_type_compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ import (
"github.com/willf/bitset"
)

type validateFunc func(aggType AggregationType) bool
type validateFn func(aggType AggregationType) bool
type errorFn func(aggType AggregationType) error

var (
validateGaugeFn = validateFunc(func(aggType AggregationType) bool { return aggType.IsValidForGauge() })
validateCounterFn = validateFunc(func(aggType AggregationType) bool { return aggType.IsValidForCounter() })
validateTimerFn = validateFunc(func(aggType AggregationType) bool { return aggType.IsValidForTimer() })
validateAllFn = validateFunc(func(aggType AggregationType) bool { return aggType.IsValid() })
validateGaugeFn = validateFn(func(aggType AggregationType) bool { return aggType.IsValidForGauge() })
validateCounterFn = validateFn(func(aggType AggregationType) bool { return aggType.IsValidForCounter() })
validateTimerFn = validateFn(func(aggType AggregationType) bool { return aggType.IsValidForTimer() })
validateAllFn = validateFn(func(aggType AggregationType) bool { return aggType.IsValid() })

invalidGaugeTypeErrorFn = func(aggType AggregationType) error {
return fmt.Errorf("invalid AggregationType: %s for Gauge", aggType.String())
Expand Down Expand Up @@ -121,7 +121,7 @@ func (c *aggregationDecompresser) DecompressForTimer(compressed CompressedAggreg
return c.decompress(compressed, validateTimerFn, invalidTimerTypeErrorFn)
}

func (c *aggregationDecompresser) decompress(compressed CompressedAggregationTypes, validate validateFunc, err errorFn) (AggregationTypes, error) {
func (c *aggregationDecompresser) decompress(compressed CompressedAggregationTypes, validate validateFn, err errorFn) (AggregationTypes, error) {
codes := make([]uint64, CompressedSize)
for i := range compressed {
codes[i] = uint64(compressed[i])
Expand Down

0 comments on commit ee49c04

Please sign in to comment.