diff --git a/circuitbreaker/util_test.go b/circuitbreaker/util_test.go index 0039b6d..b5c0391 100644 --- a/circuitbreaker/util_test.go +++ b/circuitbreaker/util_test.go @@ -40,7 +40,7 @@ // Switch the endpoint to start throwing errors. m.err = errors.New("tragedy+disaster") - m.thru = 0 + m.through = 0 // The first several should be allowed through and yield our error. for i := 0; shouldPass(i); i++ { @@ -49,7 +49,7 @@ } time.Sleep(requestDelay) } - thru := m.thru + through := m.through // But the rest should be blocked by an open circuit. for i := 0; i < 10; i++ { @@ -60,17 +60,17 @@ } // Make sure none of those got through. - if want, have := thru, m.thru; want != have { + if want, have := through, m.through; want != have { t.Errorf("%s: want %d, have %d", caller, want, have) } } type mock struct { - thru int + through int err error } func (m *mock) endpoint(context.Context, interface{}) (interface{}, error) { - m.thru++ + m.through++ return struct{}{}, m.err } diff --git a/metrics/expvar/expvar.go b/metrics/expvar/expvar.go index a76c9f0..dcb5d62 100644 --- a/metrics/expvar/expvar.go +++ b/metrics/expvar/expvar.go @@ -30,7 +30,7 @@ // Add implements Counter. func (c *Counter) Add(delta float64) { c.f.Add(delta) } -// Gauge implements the gauge metric wtih an expvar float. +// Gauge implements the gauge metric with an expvar float. // Label values are not supported. type Gauge struct { f *expvar.Float diff --git a/util/conn/manager_test.go b/util/conn/manager_test.go index 86bddbc..5e41b31 100644 --- a/util/conn/manager_test.go +++ b/util/conn/manager_test.go @@ -26,7 +26,7 @@ t.Fatal("nil conn") } - // Write and check it went thru. + // Write and check it went through. if _, err := conn.Write([]byte{1, 2, 3}); err != nil { t.Fatal(err) } @@ -55,7 +55,7 @@ t.Fatal("conn remained nil") } - // Write and check it went thru. + // Write and check it went through. if _, err := conn.Write([]byte{4, 5}); err != nil { t.Fatal(err) }