mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
refactor: enable errorlint and refactor code (#14110)
* refactor: enable errorlint and refactor code * revert * revert * add bazel * gofmt * gofmt * gofmt * gofmt * gci * lint --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
@@ -31,7 +31,7 @@ func LogThis(err error) {
|
||||
|
||||
log.WithError(err).Error("Something bad happened, but this log statement is OK :)")
|
||||
|
||||
_ = fmt.Errorf("this is ok: %v", err)
|
||||
_ = fmt.Errorf("this is ok: %w", err)
|
||||
}
|
||||
|
||||
func do() (bool, error) {
|
||||
|
||||
@@ -6,7 +6,10 @@ go_library(
|
||||
srcs = ["main.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/v5/tools/replay-http",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = ["@com_github_sirupsen_logrus//:go_default_library"],
|
||||
deps = [
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -42,7 +43,7 @@ func main() {
|
||||
lr := bufio.NewReader(f)
|
||||
for {
|
||||
line, err := lr.ReadBytes([]byte("\n")[0])
|
||||
if err == io.EOF {
|
||||
if errors.Is(err, io.EOF) {
|
||||
os.Exit(0)
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user