Fix misspells (#1531)
diff --git a/clientconn.go b/clientconn.go
index 45ea87e..6691d8a 100644
--- a/clientconn.go
+++ b/clientconn.go
@@ -279,7 +279,7 @@
}
}
-// WithKeepaliveParams returns a DialOption that specifies keepalive paramaters for the client transport.
+// WithKeepaliveParams returns a DialOption that specifies keepalive parameters for the client transport.
func WithKeepaliveParams(kp keepalive.ClientParameters) DialOption {
return func(o *dialOptions) {
o.copts.KeepaliveParams = kp
@@ -483,7 +483,7 @@
// recordTransition records state change happening in every addrConn and based on
// that it evaluates what state the ClientConn is in.
// It can only transition between connectivity.Ready, connectivity.Connecting and connectivity.TransientFailure. Other states,
-// Idle and connectivity.Shutdown are transitioned into by ClientConn; in the begining of the connection
+// Idle and connectivity.Shutdown are transitioned into by ClientConn; in the beginning of the connection
// before any addrConn is created ClientConn is in idle state. In the end when ClientConn
// closes it is in connectivity.Shutdown state.
// TODO Note that in later releases, a ClientConn with no activity will be put into an Idle state.
diff --git a/credentials/credentials_test.go b/credentials/credentials_test.go
index af40786..9b13db5 100644
--- a/credentials/credentials_test.go
+++ b/credentials/credentials_test.go
@@ -128,7 +128,7 @@
return lis
}
-// Is run in a seperate goroutine.
+// Is run in a separate goroutine.
func serverHandle(t *testing.T, hs serverHandshake, done chan AuthInfo, lis net.Listener) {
serverRawConn, err := lis.Accept()
if err != nil {
diff --git a/reflection/grpc_reflection_v1alpha/reflection.pb.go b/reflection/grpc_reflection_v1alpha/reflection.pb.go
index b148c1c..b407253 100644
--- a/reflection/grpc_reflection_v1alpha/reflection.pb.go
+++ b/reflection/grpc_reflection_v1alpha/reflection.pb.go
@@ -281,7 +281,7 @@
type ServerReflectionResponse struct {
ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost" json:"valid_host,omitempty"`
OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest" json:"original_request,omitempty"`
- // The server set one of the following fields accroding to the message_request
+ // The server set one of the following fields according to the message_request
// in the request.
//
// Types that are valid to be assigned to MessageResponse:
diff --git a/reflection/grpc_reflection_v1alpha/reflection.proto b/reflection/grpc_reflection_v1alpha/reflection.proto
index e980bdf..c52ccc6 100644
--- a/reflection/grpc_reflection_v1alpha/reflection.proto
+++ b/reflection/grpc_reflection_v1alpha/reflection.proto
@@ -72,7 +72,7 @@
message ServerReflectionResponse {
string valid_host = 1;
ServerReflectionRequest original_request = 2;
- // The server set one of the following fields accroding to the message_request
+ // The server set one of the following fields according to the message_request
// in the request.
oneof message_response {
// This message is used to answer file_by_filename, file_containing_symbol,
diff --git a/rpc_util.go b/rpc_util.go
index 423d7d3..aa0c6b6 100644
--- a/rpc_util.go
+++ b/rpc_util.go
@@ -456,7 +456,7 @@
// MaxReqSize is the maximum allowed payload size for an individual request in a
// stream (client->server) in bytes. The size which is measured is the serialized
// payload after per-message compression (but before stream compression) in bytes.
- // The actual value used is the minumum of the value specified here and the value set
+ // The actual value used is the minimum of the value specified here and the value set
// by the application via the gRPC client API. If either one is not set, then the other
// will be used. If neither is set, then the built-in default is used.
MaxReqSize *int
@@ -501,7 +501,7 @@
// SupportPackageIsVersion3 is referenced from generated protocol buffer files.
// The latest support package version is 4.
-// SupportPackageIsVersion3 is kept for compability. It will be removed in the
+// SupportPackageIsVersion3 is kept for compatibility. It will be removed in the
// next support package version update.
const SupportPackageIsVersion3 = true
diff --git a/stats/stats.go b/stats/stats.go
index e7a14d9..b64c429 100644
--- a/stats/stats.go
+++ b/stats/stats.go
@@ -220,7 +220,7 @@
// the outgoing RPC with the header grpc-tags-bin. Subsequent calls to
// SetTags will overwrite the values from earlier calls.
//
-// NOTE: this is provided only for backward compatibilty with existing clients
+// NOTE: this is provided only for backward compatibility with existing clients
// and will likely be removed in an upcoming release. New uses should transmit
// this type of data using metadata with a different, non-reserved (i.e. does
// not begin with "grpc-") header name.
@@ -230,7 +230,7 @@
// Tags returns the tags from the context for the inbound RPC.
//
-// NOTE: this is provided only for backward compatibilty with existing clients
+// NOTE: this is provided only for backward compatibility with existing clients
// and will likely be removed in an upcoming release. New uses should transmit
// this type of data using metadata with a different, non-reserved (i.e. does
// not begin with "grpc-") header name.
@@ -262,7 +262,7 @@
// the outgoing RPC with the header grpc-trace-bin. Subsequent calls to
// SetTrace will overwrite the values from earlier calls.
//
-// NOTE: this is provided only for backward compatibilty with existing clients
+// NOTE: this is provided only for backward compatibility with existing clients
// and will likely be removed in an upcoming release. New uses should transmit
// this type of data using metadata with a different, non-reserved (i.e. does
// not begin with "grpc-") header name.
@@ -272,7 +272,7 @@
// Trace returns the trace from the context for the inbound RPC.
//
-// NOTE: this is provided only for backward compatibilty with existing clients
+// NOTE: this is provided only for backward compatibility with existing clients
// and will likely be removed in an upcoming release. New uses should transmit
// this type of data using metadata with a different, non-reserved (i.e. does
// not begin with "grpc-") header name.
diff --git a/stress/grpc_testing/metrics.pb.go b/stress/grpc_testing/metrics.pb.go
index 96e1a7d..466668a 100644
--- a/stress/grpc_testing/metrics.pb.go
+++ b/stress/grpc_testing/metrics.pb.go
@@ -34,7 +34,7 @@
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-// Reponse message containing the gauge name and value
+// Response message containing the gauge name and value
type GaugeResponse struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Types that are valid to be assigned to Value:
diff --git a/stress/grpc_testing/metrics.proto b/stress/grpc_testing/metrics.proto
index dd8abda..6950400 100644
--- a/stress/grpc_testing/metrics.proto
+++ b/stress/grpc_testing/metrics.proto
@@ -22,7 +22,7 @@
package grpc.testing;
-// Reponse message containing the gauge name and value
+// Response message containing the gauge name and value
message GaugeResponse {
string name = 1;
oneof value {
diff --git a/test/end2end_test.go b/test/end2end_test.go
index 504b854..983a9b7 100644
--- a/test/end2end_test.go
+++ b/test/end2end_test.go
@@ -2175,7 +2175,7 @@
}
}
-// Test backward-compatability API for setting msg size limit.
+// Test backward-compatibility API for setting msg size limit.
func TestExceedMsgLimit(t *testing.T) {
defer leakcheck.Check(t)
for _, e := range listTestEnv() {
diff --git a/transport/bdp_estimator.go b/transport/bdp_estimator.go
index 667edb8..8dd2ed4 100644
--- a/transport/bdp_estimator.go
+++ b/transport/bdp_estimator.go
@@ -59,7 +59,7 @@
sample uint32
// bwMax is the maximum bandwidth noted so far (bytes/sec).
bwMax float64
- // bool to keep track of the begining of a new measurement cycle.
+ // bool to keep track of the beginning of a new measurement cycle.
isSent bool
// Callback to update the window sizes.
updateFlowControl func(n uint32)
@@ -70,7 +70,7 @@
}
// timesnap registers the time bdp ping was sent out so that
-// network rtt can be calculated when its ack is recieved.
+// network rtt can be calculated when its ack is received.
// It is called (by controller) when the bdpPing is
// being written on the wire.
func (b *bdpEstimator) timesnap(d [8]byte) {
@@ -119,7 +119,7 @@
b.rtt += (rttSample - b.rtt) * float64(alpha)
}
b.isSent = false
- // The number of bytes accumalated so far in the sample is smaller
+ // The number of bytes accumulated so far in the sample is smaller
// than or equal to 1.5 times the real BDP on a saturated connection.
bwCurrent := float64(b.sample) / (b.rtt * float64(1.5))
if bwCurrent > b.bwMax {
diff --git a/transport/http2_client.go b/transport/http2_client.go
index 4d811a8..31fed9e 100644
--- a/transport/http2_client.go
+++ b/transport/http2_client.go
@@ -367,7 +367,7 @@
// options, then both sets of credentials will be applied.
if callCreds := callHdr.Creds; callCreds != nil {
if !t.isSecure && callCreds.RequireTransportSecurity() {
- return nil, streamErrorf(codes.Unauthenticated, "transport: cannot send secure credentials on an insecure conneciton")
+ return nil, streamErrorf(codes.Unauthenticated, "transport: cannot send secure credentials on an insecure connection")
}
data, err := callCreds.GetRequestMetadata(ctx, audience)
if err != nil {
@@ -961,7 +961,7 @@
t.notifyError(connectionErrorf(true, nil, "received illegal http2 GOAWAY frame: stream ID %d is even", f.LastStreamID))
return
}
- // A client can recieve multiple GoAways from server (look at https://github.com/grpc/grpc-go/issues/1387).
+ // A client can receive multiple GoAways from server (look at https://github.com/grpc/grpc-go/issues/1387).
// The idea is that the first GoAway will be sent with an ID of MaxInt32 and the second GoAway will be sent after an RTT delay
// with the ID of the last stream the server will process.
// Therefore, when we get the first GoAway we don't really close any streams. While in case of second GoAway we
diff --git a/transport/http2_server.go b/transport/http2_server.go
index 80ddd5f..4f62cba 100644
--- a/transport/http2_server.go
+++ b/transport/http2_server.go
@@ -105,7 +105,7 @@
// the per-stream outbound flow control window size set by the peer.
streamSendQuota uint32
// idle is the time instant when the connection went idle.
- // This is either the begining of the connection or when the number of
+ // This is either the beginning of the connection or when the number of
// RPCs go down to 0.
// When the connection is busy, this value is set to 0.
idle time.Time
@@ -938,7 +938,7 @@
maxAge := time.NewTimer(t.kp.MaxConnectionAge)
keepalive := time.NewTimer(t.kp.Time)
// NOTE: All exit paths of this function should reset their
- // respecitve timers. A failure to do so will cause the
+ // respective timers. A failure to do so will cause the
// following clean-up to deadlock and eventually leak.
defer func() {
if !maxIdle.Stop() {
diff --git a/transport/transport.go b/transport/transport.go
index 6aabbd3..dad69be 100644
--- a/transport/transport.go
+++ b/transport/transport.go
@@ -492,9 +492,9 @@
KeepaliveParams keepalive.ClientParameters
// StatsHandler stores the handler for stats.
StatsHandler stats.Handler
- // InitialWindowSize sets the intial window size for a stream.
+ // InitialWindowSize sets the initial window size for a stream.
InitialWindowSize int32
- // InitialConnWindowSize sets the intial window size for a connection.
+ // InitialConnWindowSize sets the initial window size for a connection.
InitialConnWindowSize int32
}
@@ -720,7 +720,7 @@
// NoReason is the default value when GoAway frame is received.
NoReason GoAwayReason = 1
// TooManyPings indicates that a GoAway frame with ErrCodeEnhanceYourCalm
- // was recieved and that the debug data said "too_many_pings".
+ // was received and that the debug data said "too_many_pings".
TooManyPings GoAwayReason = 2
)