Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrimaud committed Apr 19, 2020
1 parent baaa749 commit 3188682
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion acl_create_response.go
Expand Up @@ -2,7 +2,7 @@ package sarama

import "time"

//CreateAclsResponse is a an acl reponse creation type
//CreateAclsResponse is a an acl response creation type
type CreateAclsResponse struct {
ThrottleTime time.Duration
AclCreationResponses []*AclCreationResponse
Expand Down
4 changes: 2 additions & 2 deletions alter_configs_response.go
Expand Up @@ -2,13 +2,13 @@ package sarama

import "time"

//AlterConfigsResponse is a reponse type for alter config
//AlterConfigsResponse is a response type for alter config
type AlterConfigsResponse struct {
ThrottleTime time.Duration
Resources []*AlterConfigsResourceResponse
}

//AlterConfigsResourceResponse is a reponse type for alter config resource
//AlterConfigsResourceResponse is a response type for alter config resource
type AlterConfigsResourceResponse struct {
ErrorCode int16
ErrorMsg string
Expand Down
6 changes: 3 additions & 3 deletions alter_partition_reassignments_request_test.go
Expand Up @@ -4,13 +4,13 @@ import "testing"

var (
alterPartitionReassignmentsRequestNoBlock = []byte{
0, 0, 39, 16, // timout 10000
0, 0, 39, 16, // timeout 10000
1, // 1-1=0 blocks
0, // empty tagged fields
}

alterPartitionReassignmentsRequestOneBlock = []byte{
0, 0, 39, 16, // timout 10000
0, 0, 39, 16, // timeout 10000
2, // 2-1=1 block
6, 116, 111, 112, 105, 99, // topic name "topic" as compact string
2, // 2-1=1 partitions
Expand All @@ -22,7 +22,7 @@ var (
}

alterPartitionReassignmentsAbortRequest = []byte{
0, 0, 39, 16, // timout 10000
0, 0, 39, 16, // timeout 10000
2, // 2-1=1 block
6, 116, 111, 112, 105, 99, // topic name "topic" as compact string
2, // 2-1=1 partitions
Expand Down
2 changes: 1 addition & 1 deletion api_versions_response.go
@@ -1,6 +1,6 @@
package sarama

//ApiVersionsResponseBlock is an api version reponse block type
//ApiVersionsResponseBlock is an api version response block type
type ApiVersionsResponseBlock struct {
ApiKey int16
MinVersion int16
Expand Down
6 changes: 3 additions & 3 deletions broker.go
Expand Up @@ -73,7 +73,7 @@ const (
// server negotiate SASL by wrapping tokens with Kafka protocol headers.
SASLHandshakeV1 = int16(1)
// SASLExtKeyAuth is the reserved extension key name sent as part of the
// SASL/OAUTHBEARER intial client response
// SASL/OAUTHBEARER initial client response
SASLExtKeyAuth = "auth"
)

Expand Down Expand Up @@ -369,7 +369,7 @@ func (b *Broker) Fetch(request *FetchRequest) (*FetchResponse, error) {
return response, nil
}

//CommitOffset return an Offset commit reponse or error
//CommitOffset return an Offset commit response or error
func (b *Broker) CommitOffset(request *OffsetCommitRequest) (*OffsetCommitResponse, error) {
response := new(OffsetCommitResponse)

Expand Down Expand Up @@ -1014,7 +1014,7 @@ func (b *Broker) sendAndReceiveSASLHandshake(saslType SASLMechanism, version int
// When credentials are invalid, Kafka replies with a SaslAuthenticate response
// containing an error code and message detailing the authentication failure.
func (b *Broker) sendAndReceiveSASLPlainAuth() error {
// default to V0 to allow for backward compatability when SASL is enabled
// default to V0 to allow for backward compatibility when SASL is enabled
// but not the handshake
if b.conf.Net.SASL.Handshake {
handshakeErr := b.sendAndReceiveSASLHandshake(SASLTypePlaintext, b.conf.Net.SASL.Version)
Expand Down
2 changes: 1 addition & 1 deletion broker_test.go
Expand Up @@ -295,7 +295,7 @@ func TestSASLSCRAMSHAXXX(t *testing.T) {
scramChallengeResp string
}{
{
name: "SASL/SCRAMSHAXXX successfull authentication",
name: "SASL/SCRAMSHAXXX successful authentication",
mockHandshakeErr: ErrNoError,
scramClient: &MockSCRAMClient{},
scramChallengeResp: "pong",
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Expand Up @@ -642,7 +642,7 @@ func TestClientController(t *testing.T) {
}
defer safeClose(t, client2)
if _, err = client2.Controller(); err != ErrUnsupportedVersion {
t.Errorf("Expected Contoller() to return %s, found %s", ErrUnsupportedVersion, err)
t.Errorf("Expected Controller() to return %s, found %s", ErrUnsupportedVersion, err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/consumergroup/main.go
Expand Up @@ -28,7 +28,7 @@ func init() {
flag.StringVar(&brokers, "brokers", "", "Kafka bootstrap brokers to connect to, as a comma separated list")
flag.StringVar(&group, "group", "", "Kafka consumer group definition")
flag.StringVar(&version, "version", "2.1.1", "Kafka cluster version")
flag.StringVar(&topics, "topics", "", "Kafka topics to be consumed, as a comma seperated list")
flag.StringVar(&topics, "topics", "", "Kafka topics to be consumed, as a comma separated list")
flag.StringVar(&assignor, "assignor", "range", "Consumer group partition assignment strategy (range, roundrobin, sticky)")
flag.BoolVar(&oldest, "oldest", true, "Kafka consumer consume initial offset from oldest")
flag.BoolVar(&verbose, "verbose", false, "Sarama logging")
Expand Down
2 changes: 1 addition & 1 deletion list_partition_reassignments_request_test.go
Expand Up @@ -4,7 +4,7 @@ import "testing"

var (
listPartitionReassignmentsRequestOneBlock = []byte{
0, 0, 39, 16, // timout 10000
0, 0, 39, 16, // timeout 10000
2, // 2-1=1 block
6, 116, 111, 112, 105, 99, // topic name "topic" as compact string
2, // 2-1=1 partitions
Expand Down
2 changes: 1 addition & 1 deletion record_test.go
Expand Up @@ -283,7 +283,7 @@ func TestRecordBatchDecoding(t *testing.T) {
r.length = varintLengthField{}
}
// The compression level is not restored on decoding. It is not needed
// anyway. We only set it here to ensure that comparision succeeds.
// anyway. We only set it here to ensure that comparison succeeds.
batch.CompressionLevel = tc.batch.CompressionLevel
if !reflect.DeepEqual(batch, tc.batch) {
t.Errorf(spew.Sprintf("invalid decode of %s\ngot %+v\nwanted %+v", tc.name, batch, tc.batch))
Expand Down
2 changes: 1 addition & 1 deletion sasl_authenticate_response_test.go
Expand Up @@ -17,5 +17,5 @@ func TestSaslAuthenticateResponse(t *testing.T) {
response.ErrorMessage = &msg
response.SaslAuthBytes = []byte(`msg`)

testResponse(t, "authenticate reponse", response, saslAuthenticatResponseErr)
testResponse(t, "authenticate response", response, saslAuthenticatResponseErr)
}
2 changes: 1 addition & 1 deletion tools/kafka-console-producer/README.md
Expand Up @@ -25,7 +25,7 @@ A simple command line tool to produce a single message to Kafka.
# Partitioning: by default, kafka-console-producer will partition as follows:
# - manual partitioning if a -partition is provided
# - hash partitioning by key if a -key is provided
# - random partioning otherwise.
# - random partitioning otherwise.
#
# You can override this using the -partitioner argument:
echo "hello world" | kafka-console-producer -topic=test -key=key -partitioner=random
Expand Down

0 comments on commit 3188682

Please sign in to comment.