I actually was gonna say something about `ObserverEffect` but then I
remembered `getFletcherFromDayCare` and decided I had no platform whence to
speak.


On Fri, Sep 13, 2013 at 11:51 AM, Wade Simmons <notifications@github.com>wrote:

> In counter.go:
>
> > @@ -13,6 +13,32 @@ type Counter interface {
> >  	Inc(int64)
> >  }
> >
> > +// Create a new Counter.
> > +func NewCounter() Counter {
> > +	if UseNilMetrics {
> > +		return NilCounter{}
> > +	}
> > +	return &StandardCounter{0}
> > +}
> > +
> > +// No-op Counter.
> > +type NilCounter struct{}
> > +
> > +// Force the compiler to check that NilCounter implements Counter.
> > +var _ Counter = NilCounter{}
>
> This is cool trick, but unnecessary here since NewCounter will enforce the
> same thing.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/rcrowley/go-metrics/pull/17/files#r6355966>
> .
>