diff --git a/health/client.go b/health/client.go index 02bb8a3f..419f0604 100644 --- a/health/client.go +++ b/health/client.go @@ -105,7 +105,7 @@ retryConnection: continue retryConnection } - // As a message has been received, removes the need for backoff for the next retry by reseting the try count. + // As a message has been received, removes the need for backoff for the next retry by resetting the try count. tryCnt = 0 if resp.Status == healthpb.HealthCheckResponse_SERVING { setConnectivityState(connectivity.Ready) diff --git a/health/server.go b/health/server.go index 065069d8..2262607f 100644 --- a/health/server.go +++ b/health/server.go @@ -139,7 +139,7 @@ func (s *Server) setServingStatusLocked(service string, servingStatus healthpb.H // Shutdown sets all serving status to NOT_SERVING, and configures the server to // ignore all future status changes. // -// This changes serving status for all services. To set status for a perticular +// This changes serving status for all services. To set status for a particular // services, call SetServingStatus(). func (s *Server) Shutdown() { s.mu.Lock() @@ -153,7 +153,7 @@ func (s *Server) Shutdown() { // Resume sets all serving status to SERVING, and configures the server to // accept all future status changes. // -// This changes serving status for all services. To set status for a perticular +// This changes serving status for all services. To set status for a particular // services, call SetServingStatus(). func (s *Server) Resume() { s.mu.Lock() diff --git a/internal/binarylog/binarylog.go b/internal/binarylog/binarylog.go index fee6aecd..4062c025 100644 --- a/internal/binarylog/binarylog.go +++ b/internal/binarylog/binarylog.go @@ -34,7 +34,7 @@ type Logger interface { } // binLogger is the global binary logger for the binary. One of this should be -// built at init time from the configuration (environment varialbe or flags). +// built at init time from the configuration (environment variable or flags). // // It is used to get a methodLogger for each individual method. var binLogger Logger diff --git a/internal/binarylog/env_config.go b/internal/binarylog/env_config.go index 3f7d389e..be30d0e6 100644 --- a/internal/binarylog/env_config.go +++ b/internal/binarylog/env_config.go @@ -43,7 +43,7 @@ import ( // Foo. // // If two configs exist for one certain method or service, the one specified -// later overrides the privous config. +// later overrides the previous config. func NewLoggerFromConfigString(s string) Logger { if s == "" { return nil diff --git a/internal/binarylog/sink.go b/internal/binarylog/sink.go index 20d044f0..a2e7c346 100644 --- a/internal/binarylog/sink.go +++ b/internal/binarylog/sink.go @@ -63,7 +63,7 @@ func (ns *noopSink) Close() error { return nil } // newWriterSink creates a binary log sink with the given writer. // -// Write() marshalls the proto message and writes it to the given writer. Each +// Write() marshals the proto message and writes it to the given writer. Each // message is prefixed with a 4 byte big endian unsigned integer as the length. // // No buffer is done, Close() doesn't try to close the writer. diff --git a/internal/internal.go b/internal/internal.go index cbfe345b..b96b3597 100644 --- a/internal/internal.go +++ b/internal/internal.go @@ -28,9 +28,9 @@ import ( ) var ( - // WithResolverBuilder is exported by dialoptions.go + // WithResolverBuilder is set by dialoptions.go WithResolverBuilder interface{} // func (resolver.Builder) grpc.DialOption - // WithHealthCheckFunc is not exported by dialoptions.go + // WithHealthCheckFunc is set by dialoptions.go WithHealthCheckFunc interface{} // func (HealthChecker) DialOption // HealthCheckFunc is used to provide client-side LB channel health checking HealthCheckFunc HealthChecker diff --git a/internal/leakcheck/leakcheck.go b/internal/leakcheck/leakcheck.go index 76f9fc54..946c575f 100644 --- a/internal/leakcheck/leakcheck.go +++ b/internal/leakcheck/leakcheck.go @@ -111,7 +111,7 @@ func check(efer Errorfer, timeout time.Duration) { } // Check looks at the currently-running goroutines and checks if there are any -// interestring (created by gRPC) goroutines leaked. It waits up to 10 seconds +// interesting (created by gRPC) goroutines leaked. It waits up to 10 seconds // in the error cases. func Check(efer Errorfer) { check(efer, 10*time.Second) diff --git a/stats/stats_test.go b/stats/stats_test.go index 7805fc47..eb286539 100644 --- a/stats/stats_test.go +++ b/stats/stats_test.go @@ -404,8 +404,8 @@ const ( outPayload outHeader // TODO: test outTrailer ? - connbegin - connend + connBegin + connEnd ) func checkBegin(t *testing.T, d *gotData, e *expectedData) { @@ -1040,17 +1040,17 @@ func checkClientStats(t *testing.T, got []*gotData, expect *expectedData, checkF checkFuncs[end].f(t, s, expect) checkFuncs[end].c-- case *stats.ConnBegin: - if checkFuncs[connbegin].c <= 0 { + if checkFuncs[connBegin].c <= 0 { t.Fatalf("unexpected stats: %T", s.s) } - checkFuncs[connbegin].f(t, s, expect) - checkFuncs[connbegin].c-- + checkFuncs[connBegin].f(t, s, expect) + checkFuncs[connBegin].c-- case *stats.ConnEnd: - if checkFuncs[connend].c <= 0 { + if checkFuncs[connEnd].c <= 0 { t.Fatalf("unexpected stats: %T", s.s) } - checkFuncs[connend].f(t, s, expect) - checkFuncs[connend].c-- + checkFuncs[connEnd].f(t, s, expect) + checkFuncs[connEnd].c-- default: t.Fatalf("unexpected stats: %T", s.s) } diff --git a/stress/client/main.go b/stress/client/main.go index d9115c94..40aa99fe 100644 --- a/stress/client/main.go +++ b/stress/client/main.go @@ -53,7 +53,7 @@ var ( useTLS = flag.Bool("use_tls", false, "Connection uses TLS if true, else plain TCP") testCA = flag.Bool("use_test_ca", false, "Whether to replace platform root CAs with test CA as the CA root") tlsServerName = flag.String("server_host_override", "foo.test.google.fr", "The server name use to verify the hostname returned by TLS handshake if it is not empty. Otherwise, --server_host is used.") - caFile = flag.String("ca_file", "", "The file containning the CA root cert file") + caFile = flag.String("ca_file", "", "The file containing the CA root cert file") ) // testCaseWithWeight contains the test case type and its weight. diff --git a/stress/metrics_client/main.go b/stress/metrics_client/main.go index c9a5c8c5..c5976892 100644 --- a/stress/metrics_client/main.go +++ b/stress/metrics_client/main.go @@ -30,14 +30,14 @@ import ( ) var ( - metricsServerAddress = flag.String("metrics_server_address", "", "The metrics server addresses in the fomrat :") + metricsServerAddress = flag.String("metrics_server_address", "", "The metrics server addresses in the format :") totalOnly = flag.Bool("total_only", false, "If true, this prints only the total value of all gauges") ) func printMetrics(client metricspb.MetricsServiceClient, totalOnly bool) { stream, err := client.GetAllGauges(context.Background(), &metricspb.EmptyMessage{}) if err != nil { - grpclog.Fatalf("failed to call GetAllGuages: %v", err) + grpclog.Fatalf("failed to call GetAllGauges: %v", err) } var (