Skip to content

Commit

Permalink
Merge pull request #260 from CodeLingoBot/rewrite
Browse files Browse the repository at this point in the history
Fix function comments based on best practices from Effective Go
  • Loading branch information
syndtr authored Feb 26, 2019
2 parents edc41b2 + 64f7afd commit 4217c9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion leveldb/filter/bloom.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func bloomHash(key []byte) uint32 {

type bloomFilter int

// The bloom filter serializes its parameters and is backward compatible
// Name: The bloom filter serializes its parameters and is backward compatible
// with respect to them. Therefor, its parameters are not added to its
// name.
func (bloomFilter) Name() string {
Expand Down
8 changes: 4 additions & 4 deletions leveldb/util/buffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func TestGrow(t *testing.T) {
}
}

// Was a bug: used to give EOF reading empty slice at EOF.
// TestReadEmptyAtEOF: Was a bug: used to give EOF reading empty slice at EOF.
func TestReadEmptyAtEOF(t *testing.T) {
b := new(Buffer)
slice := make([]byte, 0)
Expand All @@ -318,7 +318,7 @@ func TestReadEmptyAtEOF(t *testing.T) {
}
}

// Tests that we occasionally compact. Issue 5154.
// TestBufferGrowth tests that we occasionally compact. Issue 5154.
func TestBufferGrowth(t *testing.T) {
var b Buffer
buf := make([]byte, 1024)
Expand All @@ -339,7 +339,7 @@ func TestBufferGrowth(t *testing.T) {
}
}

// From Issue 5154.
// BenchmarkBufferNotEmptyWriteRead: From Issue 5154.
func BenchmarkBufferNotEmptyWriteRead(b *testing.B) {
buf := make([]byte, 1024)
for i := 0; i < b.N; i++ {
Expand All @@ -352,7 +352,7 @@ func BenchmarkBufferNotEmptyWriteRead(b *testing.B) {
}
}

// Check that we don't compact too often. From Issue 5154.
// BenchmarkBufferFullSmallReads checks that we don't compact too often. From Issue 5154.
func BenchmarkBufferFullSmallReads(b *testing.B) {
buf := make([]byte, 1024)
for i := 0; i < b.N; i++ {
Expand Down

0 comments on commit 4217c9f

Please sign in to comment.