fix some comments typos (#315)

This commit is contained in:
Mario Trangoni 2018-04-08 11:28:30 +02:00 committed by Brian Brazil
parent bd832fc827
commit b7173eb0e5
3 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@
// The code in this file was largely written by Damian Gryski as part of // The code in this file was largely written by Damian Gryski as part of
// https://github.com/dgryski/go-tsz and published under the license below. // https://github.com/dgryski/go-tsz and published under the license below.
// It was modified to accomodate reading from byte slices without modifying // It was modified to accommodate reading from byte slices without modifying
// the underlying bytes, which would panic when reading from mmaped // the underlying bytes, which would panic when reading from mmaped
// read-only byte slices. // read-only byte slices.

View file

@ -631,7 +631,7 @@ func TestComputeChunkEndTime(t *testing.T) {
max: 1000, max: 1000,
res: 1000, res: 1000,
}, },
// Catch divison by zero for cur == start. Strictly not a possible case. // Catch division by zero for cur == start. Strictly not a possible case.
{ {
start: 100, start: 100,
cur: 100, cur: 100,

4
wal.go
View file

@ -418,7 +418,7 @@ func (w *SegmentWAL) Truncate(mint int64, keep func(uint64) bool) error {
} }
// The file object of csf still holds the name before rename. Recreate it so // The file object of csf still holds the name before rename. Recreate it so
// subsequent truncations do not look at a non-existant file name. // subsequent truncations do not look at a non-existent file name.
csf.File, err = w.openSegmentFile(candidates[0].Name()) csf.File, err = w.openSegmentFile(candidates[0].Name())
if err != nil { if err != nil {
return err return err
@ -1015,7 +1015,7 @@ func (r *walReader) at() (WALEntryType, byte, []byte) {
} }
// next returns decodes the next entry pair and returns true // next returns decodes the next entry pair and returns true
// if it was succesful. // if it was successful.
func (r *walReader) next() bool { func (r *walReader) next() bool {
if r.cur >= len(r.files) { if r.cur >= len(r.files) {
return false return false