Skip to content

Commit

Permalink
Use semerr
Browse files Browse the repository at this point in the history
Co-authored-by: Maksym Kryvchun <hedhyw@yahoo.com>
  • Loading branch information
chirino and hedhyw committed Sep 12, 2024
1 parent 88a3750 commit 867c889
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ require (
github.com/gabriel-vasile/mimetype v1.4.4 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/hedhyw/semerr v0.6.7 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ github.com/hedhyw/bubbles v0.0.4 h1:4QZeYNa6KcE2CAszgQ07rSk4qd2EDj4FlH9Q3oECq5w=
github.com/hedhyw/bubbles v0.0.4/go.mod h1:0B5SDVyyRXMteAgJRkYRJQ6bvsKtWdzeepp8rN+RhXQ=
github.com/hedhyw/jsoncjson v1.1.0 h1:uw/aqmbSXAQNJHDPLb+DpwlPNzMREGIsrs+TIwPk+f0=
github.com/hedhyw/jsoncjson v1.1.0/go.mod h1:++nXlbEXzRMcqkoDLvH5I/z5qBkacAWSZDt1u6osUPc=
github.com/hedhyw/semerr v0.6.7 h1:C9TaGpxJfbiiyyja+kFSZB9QK7vSNKc1RZPmWbXBmPI=
github.com/hedhyw/semerr v0.6.7/go.mod h1:GqxYzQ0igy0bi6pc0e38FScn9rQk1n4l+PuVKlQNMW4=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
Expand Down
3 changes: 2 additions & 1 deletion internal/pkg/source/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bufio"
"bytes"
"errors"
"github.com/hedhyw/semerr/pkg/v1/semerr"
"io"
"os"

Expand Down Expand Up @@ -116,7 +117,7 @@ func (is *Source) CanFollow() bool {
return len(is.name) != 0
}

var ErrFileTruncated = errors.New("file truncated")
const ErrFileTruncated semerr.Error = "file truncated"

// ReadLogEntry reads the next ReadLogEntry from the file.
func (is *Source) ReadLogEntry() (LazyLogEntry, error) {
Expand Down

0 comments on commit 867c889

Please sign in to comment.