Skip to content

Commit f1ce38b

Browse files
docs: fix typos and comments (#1382)
1 parent 755cac0 commit f1ce38b

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (batch *Batch) Throttle() time.Duration {
4646
return batch.throttle
4747
}
4848

49-
// Watermark returns the current highest watermark in a partition.
49+
// HighWaterMark returns the current highest watermark in a partition.
5050
func (batch *Batch) HighWaterMark() int64 {
5151
return batch.highWaterMark
5252
}

createtopics.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/segmentio/kafka-go/protocol/createtopics"
1111
)
1212

13-
// CreateTopicRequests represents a request sent to a kafka broker to create
13+
// CreateTopicsRequest represents a request sent to a kafka broker to create
1414
// new topics.
1515
type CreateTopicsRequest struct {
1616
// Address of the kafka broker to send the request to.
@@ -27,7 +27,7 @@ type CreateTopicsRequest struct {
2727
ValidateOnly bool
2828
}
2929

30-
// CreateTopicResponse represents a response from a kafka broker to a topic
30+
// CreateTopicsResponse represents a response from a kafka broker to a topic
3131
// creation request.
3232
type CreateTopicsResponse struct {
3333
// The amount of time that the broker throttled the request.

describeclientquotas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type DescribeClientQuotasRequestComponent struct {
3535
Match string
3636
}
3737

38-
// DescribeClientQuotasReesponse represents a response from a kafka broker to a describe client quota request.
38+
// DescribeClientQuotasResponse represents a response from a kafka broker to a describe client quota request.
3939
type DescribeClientQuotasResponse struct {
4040
// The amount of time that the broker throttled the request.
4141
Throttle time.Duration

listoffset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type OffsetRequest struct {
1717
}
1818

1919
// FirstOffsetOf constructs an OffsetRequest which asks for the first offset of
20-
// the parition given as argument.
20+
// the partition given as argument.
2121
func FirstOffsetOf(partition int) OffsetRequest {
2222
return OffsetRequest{Partition: partition, Timestamp: FirstOffset}
2323
}

metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type MetadataRequest struct {
1919
Topics []string
2020
}
2121

22-
// MetadatResponse represents a response from a kafka broker to a metadata
22+
// MetadataResponse represents a response from a kafka broker to a metadata
2323
// request.
2424
type MetadataResponse struct {
2525
// The amount of time that the broker throttled the request.

protocol/record.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func (rs *RecordSet) ReadFrom(r io.Reader) (int64, error) {
191191
// Reconstruct the prefix that we had to read to determine the version
192192
// of the record set from the magic byte.
193193
//
194-
// Technically this may recurisvely stack readers when consuming all
194+
// Technically this may recursively stack readers when consuming all
195195
// items of the batch, which could hurt performance. In practice this
196196
// path should not be taken tho, since the decoder would read from a
197197
// *bufio.Reader which implements the bufferedReader interface.
@@ -304,7 +304,7 @@ type RawRecordSet struct {
304304
// then writes/encodes the RecordSet to a buffer referenced by the RawRecordSet.
305305
//
306306
// Note: re-using the RecordSet.ReadFrom implementation makes this suboptimal from a
307-
// performance standpoint as it require an extra copy of the record bytes. Holding off
307+
// performance standpoint as it requires an extra copy of the record bytes. Holding off
308308
// on optimizing, as this code path is only invoked in tests.
309309
func (rrs *RawRecordSet) ReadFrom(r io.Reader) (int64, error) {
310310
rs := &RecordSet{}

record.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Record = protocol.Record
3535
// RecordReader values are not safe to use concurrently from multiple goroutines.
3636
type RecordReader = protocol.RecordReader
3737

38-
// NewRecordReade reconstructs a RecordSet which exposes the sequence of records
38+
// NewRecordReader reconstructs a RecordSet which exposes the sequence of records
3939
// passed as arguments.
4040
func NewRecordReader(records ...Record) RecordReader {
4141
return protocol.NewRecordReader(records...)

0 commit comments

Comments
 (0)