Parcourir la source

Remove dead code.

Richard Crowley il y a 12 ans
Parent
commit
afe4dd2c31
9 fichiers modifiés avec 0 ajouts et 51 suppressions
  1. 0 6
      counter.go
  2. 0 6
      ewma.go
  3. 0 6
      gauge.go
  4. 0 6
      healthcheck.go
  5. 0 6
      histogram.go
  6. 0 6
      meter.go
  7. 0 3
      registry.go
  8. 0 6
      sample.go
  9. 0 6
      timer.go

+ 0 - 6
counter.go

@@ -24,9 +24,6 @@ func NewCounter() Counter {
 // No-op Counter.
 type NilCounter struct{}
 
-// Force the compiler to check that NilCounter implements Counter.
-var _ Counter = NilCounter{}
-
 // No-op.
 func (c NilCounter) Clear() {}
 
@@ -45,9 +42,6 @@ type StandardCounter struct {
 	count int64
 }
 
-// Force the compiler to check that StandardCounter implements Counter.
-var _ Counter = &StandardCounter{}
-
 // Clear the counter: set it to zero.
 func (c *StandardCounter) Clear() {
 	atomic.StoreInt64(&c.count, 0)

+ 0 - 6
ewma.go

@@ -43,9 +43,6 @@ func NewEWMA15() EWMA {
 // No-op EWMA.
 type NilEWMA struct{}
 
-// Force the compiler to check that NilEWMA implements EWMA.
-var _ EWMA = NilEWMA{}
-
 // No-op.
 func (a NilEWMA) Rate() float64 { return 0.0 }
 
@@ -66,9 +63,6 @@ type StandardEWMA struct {
 	uncounted int64
 }
 
-// Force the compiler to check that StandardEWMA implements EWMA.
-var _ EWMA = &StandardEWMA{}
-
 // Return the moving average rate of events per second.
 func (a *StandardEWMA) Rate() float64 {
 	a.mutex.Lock()

+ 0 - 6
gauge.go

@@ -22,9 +22,6 @@ func NewGauge() Gauge {
 // No-op Gauge.
 type NilGauge struct{}
 
-// Force the compiler to check that NilGauge implements Gauge.
-var _ Gauge = NilGauge{}
-
 // No-op.
 func (g NilGauge) Update(v int64) {}
 
@@ -37,9 +34,6 @@ type StandardGauge struct {
 	value int64
 }
 
-// Force the compiler to check that StandardGauge implements Gauge.
-var _ Gauge = &StandardGauge{}
-
 // Update the gauge's value.
 func (g *StandardGauge) Update(v int64) {
 	atomic.StoreInt64(&g.value, v)

+ 0 - 6
healthcheck.go

@@ -23,9 +23,6 @@ func NewHealthcheck(f func(Healthcheck)) Healthcheck {
 // No-op Healthcheck.
 type NilHealthcheck struct{}
 
-// Force the compiler to check that NilHealthcheck implements Healthcheck.
-var _ Healthcheck = NilHealthcheck{}
-
 // No-op.
 func (h NilHealthcheck) Check() {}
 
@@ -45,9 +42,6 @@ type StandardHealthcheck struct {
 	f   func(Healthcheck)
 }
 
-// Force the compiler to check that StandardHealthcheck implements Healthcheck.
-var _ Healthcheck = &StandardHealthcheck{}
-
 // Update the healthcheck's status.
 func (h *StandardHealthcheck) Check() {
 	h.f(h)

+ 0 - 6
histogram.go

@@ -42,9 +42,6 @@ func NewHistogram(s Sample) Histogram {
 // No-op Histogram.
 type NilHistogram struct{}
 
-// Force the compiler to check that NilHistogram implements Histogram.
-var _ Histogram = NilHistogram{}
-
 // No-op.
 func (h NilHistogram) Clear() {}
 
@@ -86,9 +83,6 @@ type StandardHistogram struct {
 	variance             [2]float64
 }
 
-// Force the compiler to check that StandardHistogram implements Histogram.
-var _ Histogram = &StandardHistogram{}
-
 // Clear the histogram.
 func (h *StandardHistogram) Clear() {
 	h.mutex.Lock()

+ 0 - 6
meter.go

@@ -34,9 +34,6 @@ func NewMeter() Meter {
 // No-op Meter.
 type NilMeter struct{}
 
-// Force the compiler to check that NilMeter implements Meter.
-var _ Meter = NilMeter{}
-
 // No-op.
 func (m NilMeter) Count() int64 { return 0 }
 
@@ -64,9 +61,6 @@ type StandardMeter struct {
 	ticker *time.Ticker
 }
 
-// Force the compiler to check that StandardMeter implements Meter.
-var _ Meter = &StandardMeter{}
-
 // Return the count of events seen.
 func (m *StandardMeter) Count() int64 {
 	return (<-m.out).count

+ 0 - 3
registry.go

@@ -32,9 +32,6 @@ type StandardRegistry struct {
 	mutex   sync.Mutex
 }
 
-// Force the compiler to check that StandardRegistry implements Registry.
-var _ Registry = &StandardRegistry{}
-
 // Create a new registry.
 func NewRegistry() Registry {
 	return &StandardRegistry{metrics: make(map[string]interface{})}

+ 0 - 6
sample.go

@@ -35,9 +35,6 @@ type ExpDecaySample struct {
 	values        expDecaySampleHeap
 }
 
-// Force the compiler to check that ExpDecaySample implements Sample.
-var _ Sample = &ExpDecaySample{}
-
 // Create a new exponentially-decaying sample with the given reservoir size
 // and alpha.
 func NewExpDecaySample(reservoirSize int, alpha float64) Sample {
@@ -109,9 +106,6 @@ func (s *ExpDecaySample) Values() []int64 {
 // No-op Sample.
 type NilSample struct{}
 
-// Force the compiler to check that ExpDecaySample implements Sample.
-var _ Sample = NilSample{}
-
 // No-op.
 func (s NilSample) Clear() {}
 

+ 0 - 6
timer.go

@@ -50,9 +50,6 @@ type NilTimer struct {
 	m Meter
 }
 
-// Force the compiler to check that NilTimer implements Timer.
-var _ Timer = NilTimer{}
-
 // No-op.
 func (t NilTimer) Count() int64 { return 0 }
 
@@ -103,9 +100,6 @@ type StandardTimer struct {
 	m Meter
 }
 
-// Force the compiler to check that StandardTimer implements Timer.
-var _ Timer = &StandardTimer{}
-
 // Return the count of inputs.
 func (t *StandardTimer) Count() int64 {
 	return t.h.Count()