mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -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:
@@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
|
||||
"github.com/prysmaticlabs/prysm/v5/crypto/hash"
|
||||
"gopkg.in/yaml.v2"
|
||||
@@ -32,7 +33,8 @@ func ParseGraffitiFile(f string) (*Graffiti, error) {
|
||||
}
|
||||
g := &Graffiti{}
|
||||
if err := yaml.UnmarshalStrict(yamlFile, g); err != nil {
|
||||
if _, ok := err.(*yaml.TypeError); !ok {
|
||||
var typeError *yaml.TypeError
|
||||
if !errors.As(err, &typeError) {
|
||||
return nil, err
|
||||
} else {
|
||||
log.WithError(err).Error("There were some issues parsing graffiti from a yaml file.")
|
||||
|
||||
Reference in New Issue
Block a user