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
// 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
// read-only byte slices.

View File

@ -631,7 +631,7 @@ func TestComputeChunkEndTime(t *testing.T) {
max: 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,
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
// 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())
if err != nil {
return err
@ -1015,7 +1015,7 @@ func (r *walReader) at() (WALEntryType, byte, []byte) {
}
// next returns decodes the next entry pair and returns true
// if it was succesful.
// if it was successful.
func (r *walReader) next() bool {
if r.cur >= len(r.files) {
return false