Skip to content

Commit

Permalink
fix grammer and undo unncessary diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
purnesh42H committed Sep 3, 2024
1 parent 551ffd4 commit 7ee93ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions internal/testutils/stats/test_metrics_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,17 @@ func (r *TestMetricsRecorder) HandleConn(context.Context, stats.ConnStats) {}
// nil panics.
type NoopMetricsRecorder struct{}

// RecordInt64Count noop implementation of RecordInt64Count.
// RecordInt64Count is a noop implementation of RecordInt64Count.
func (r *NoopMetricsRecorder) RecordInt64Count(*estats.Int64CountHandle, int64, ...string) {}

// RecordFloat64Count is noop implementation of RecordFloat64Count.
// RecordFloat64Count is a noop implementation of RecordFloat64Count.
func (r *NoopMetricsRecorder) RecordFloat64Count(*estats.Float64CountHandle, float64, ...string) {}

// RecordInt64Histo is noop implementation of RecordInt64Histo.
// RecordInt64Histo is a noop implementation of RecordInt64Histo.
func (r *NoopMetricsRecorder) RecordInt64Histo(*estats.Int64HistoHandle, int64, ...string) {}

// RecordFloat64Histo is noop implementation of RecordFloat64Histo.
// RecordFloat64Histo is a noop implementation of RecordFloat64Histo.
func (r *NoopMetricsRecorder) RecordFloat64Histo(*estats.Float64HistoHandle, float64, ...string) {}

// RecordInt64Gauge is noop implementation of RecordInt64Gauge.
// RecordInt64Gauge is a noop implementation of RecordInt64Gauge.
func (r *NoopMetricsRecorder) RecordInt64Gauge(*estats.Int64GaugeHandle, int64, ...string) {}
9 changes: 4 additions & 5 deletions mem/buffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,12 @@ func SplitUnsafe(buf Buffer, n int) (left, right Buffer) {
return buf.split(n)
}

// emptyBuffer is a Buffer implementation that represents an empty buffer. All
// methods are no-op implementations.
type emptyBuffer struct{}

func (e emptyBuffer) ReadOnlyData() []byte {
return nil
}

func (e emptyBuffer) Ref() {}
func (e emptyBuffer) Free() {}

Expand All @@ -243,13 +242,13 @@ type SliceBuffer []byte
// ReadOnlyData returns the byte slice.
func (s SliceBuffer) ReadOnlyData() []byte { return s }

// Ref is noop implementation of Ref.
// Ref is a noop implementation of Ref.
func (s SliceBuffer) Ref() {}

// Free is noop implementation of Free.
// Free is a noop implementation of Free.
func (s SliceBuffer) Free() {}

// Len is noop implementation of Len.
// Len is a noop implementation of Len.
func (s SliceBuffer) Len() int { return len(s) }

func (s SliceBuffer) split(n int) (left, right Buffer) {
Expand Down

0 comments on commit 7ee93ab

Please sign in to comment.