Skip to content

docs: fix typos and comments #1382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (batch *Batch) Throttle() time.Duration {
return batch.throttle
}

// Watermark returns the current highest watermark in a partition.
// HighWaterMark returns the current highest watermark in a partition.
func (batch *Batch) HighWaterMark() int64 {
return batch.highWaterMark
}
Expand Down
4 changes: 2 additions & 2 deletions createtopics.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/segmentio/kafka-go/protocol/createtopics"
)

// CreateTopicRequests represents a request sent to a kafka broker to create
// CreateTopicsRequest represents a request sent to a kafka broker to create
// new topics.
type CreateTopicsRequest struct {
// Address of the kafka broker to send the request to.
Expand All @@ -27,7 +27,7 @@ type CreateTopicsRequest struct {
ValidateOnly bool
}

// CreateTopicResponse represents a response from a kafka broker to a topic
// CreateTopicsResponse represents a response from a kafka broker to a topic
// creation request.
type CreateTopicsResponse struct {
// The amount of time that the broker throttled the request.
Expand Down
2 changes: 1 addition & 1 deletion describeclientquotas.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type DescribeClientQuotasRequestComponent struct {
Match string
}

// DescribeClientQuotasReesponse represents a response from a kafka broker to a describe client quota request.
// DescribeClientQuotasResponse represents a response from a kafka broker to a describe client quota request.
type DescribeClientQuotasResponse struct {
// The amount of time that the broker throttled the request.
Throttle time.Duration
Expand Down
2 changes: 1 addition & 1 deletion listoffset.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type OffsetRequest struct {
}

// FirstOffsetOf constructs an OffsetRequest which asks for the first offset of
// the parition given as argument.
// the partition given as argument.
func FirstOffsetOf(partition int) OffsetRequest {
return OffsetRequest{Partition: partition, Timestamp: FirstOffset}
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type MetadataRequest struct {
Topics []string
}

// MetadatResponse represents a response from a kafka broker to a metadata
// MetadataResponse represents a response from a kafka broker to a metadata
// request.
type MetadataResponse struct {
// The amount of time that the broker throttled the request.
Expand Down
4 changes: 2 additions & 2 deletions protocol/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (rs *RecordSet) ReadFrom(r io.Reader) (int64, error) {
// Reconstruct the prefix that we had to read to determine the version
// of the record set from the magic byte.
//
// Technically this may recurisvely stack readers when consuming all
// Technically this may recursively stack readers when consuming all
// items of the batch, which could hurt performance. In practice this
// path should not be taken tho, since the decoder would read from a
// *bufio.Reader which implements the bufferedReader interface.
Expand Down Expand Up @@ -304,7 +304,7 @@ type RawRecordSet struct {
// then writes/encodes the RecordSet to a buffer referenced by the RawRecordSet.
//
// Note: re-using the RecordSet.ReadFrom implementation makes this suboptimal from a
// performance standpoint as it require an extra copy of the record bytes. Holding off
// performance standpoint as it requires an extra copy of the record bytes. Holding off
// on optimizing, as this code path is only invoked in tests.
func (rrs *RawRecordSet) ReadFrom(r io.Reader) (int64, error) {
rs := &RecordSet{}
Expand Down
2 changes: 1 addition & 1 deletion record.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Record = protocol.Record
// RecordReader values are not safe to use concurrently from multiple goroutines.
type RecordReader = protocol.RecordReader

// NewRecordReade reconstructs a RecordSet which exposes the sequence of records
// NewRecordReader reconstructs a RecordSet which exposes the sequence of records
// passed as arguments.
func NewRecordReader(records ...Record) RecordReader {
return protocol.NewRecordReader(records...)
Expand Down