Skip to content

Commit

Permalink
* querylog: better errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Nov 10, 2020
1 parent 27b13a4 commit 774159c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/querylog/qlog_file.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package querylog

import (
"errors"
"io"
"os"
"sync"
Expand All @@ -11,12 +10,12 @@ import (
"github.com/AdguardTeam/golibs/log"
)

// ErrSeekNotFound is returned from the Seek method
// if we failed to find the desired record
var ErrSeekNotFound = errors.New("Seek not found the record")
// ErrSeekNotFound is returned from Seek if when it fails to find the requested
// record.
const ErrSeekNotFound agherr.Error = "seek: record not found"

// ErrEndOfLog is returned when the end of the current log is reached.
var ErrEndOfLog agherr.Error = "end of log"
// ErrEndOfLog is returned from Seek when the end of the current log is reached.
const ErrEndOfLog agherr.Error = "seek: end of log"

// TODO: Find a way to grow buffer instead of relying on this value when reading strings
const maxEntrySize = 16 * 1024
Expand Down

0 comments on commit 774159c

Please sign in to comment.