Skip to content

Commit cfdb2d8

Browse files
committed
keys, parser, reconciler
1 parent cdbbc3c commit cfdb2d8

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

keys/errors.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ var (
5050
ErrVerifyFailed = errors.New("verify: verify returned false")
5151
)
5252

53-
// ErrKeys takes an error as an argument and returns
53+
// Err takes an error as an argument and returns
5454
// whether or not the error is one thrown by the keys package
55-
func ErrKeys(err error) bool {
55+
func Err(err error) bool {
5656
keyErrors := []error{
5757
ErrPrivKeyUndecodable,
5858
ErrPrivKeyLengthInvalid,

keys/errors_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/stretchr/testify/assert"
2222
)
2323

24-
func TestErrKeys(t *testing.T) {
24+
func TestErr(t *testing.T) {
2525
var tests = map[string]struct {
2626
err error
2727
is bool
@@ -38,7 +38,7 @@ func TestErrKeys(t *testing.T) {
3838

3939
for name, test := range tests {
4040
t.Run(name, func(t *testing.T) {
41-
is := ErrKeys(test.err)
41+
is := Err(test.err)
4242
assert.Equal(t, test.is, is)
4343
})
4444
}

parser/errors.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ var (
113113
}
114114
)
115115

116-
// ErrParser takes an error as an argument and returns
116+
// Err takes an error as an argument and returns
117117
// whether or not the error is one thrown by the asserter
118118
// along with the specific source of the error
119-
func ErrParser(err error) (bool, string) {
119+
func Err(err error) (bool, string) {
120120
parserErrs := map[string][]error{
121121
"intent error": IntentErrs,
122122
"match operations error": MatchOpsErrs,

parser/errors_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"github.com/stretchr/testify/assert"
2121
)
2222

23-
func TestErrParser(t *testing.T) {
23+
func TestErr(t *testing.T) {
2424
var tests = map[string]struct {
2525
err error
2626
is bool
@@ -40,7 +40,7 @@ func TestErrParser(t *testing.T) {
4040

4141
for name, test := range tests {
4242
t.Run(name, func(t *testing.T) {
43-
is, source := ErrParser(test.err)
43+
is, source := Err(test.err)
4444
assert.Equal(t, test.is, is)
4545
assert.Equal(t, test.source, source)
4646
})

reconciler/errors.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ var (
4545
ErrLiveBalanceLookupFailed = errors.New("unable to lookup live balance")
4646
)
4747

48-
// ErrReconciler takes an error as an argument and returns
48+
// Err takes an error as an argument and returns
4949
// whether or not the error is one thrown by the keys package
50-
func ErrReconciler(err error) bool {
50+
func Err(err error) bool {
5151
reconcilerErrors := []error{
5252
ErrHeadBlockBehindLive,
5353
ErrAccountUpdated,

reconciler/errors_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/stretchr/testify/assert"
2222
)
2323

24-
func TestErrKeys(t *testing.T) {
24+
func TestErr(t *testing.T) {
2525
var tests = map[string]struct {
2626
err error
2727
is bool
@@ -38,7 +38,7 @@ func TestErrKeys(t *testing.T) {
3838

3939
for name, test := range tests {
4040
t.Run(name, func(t *testing.T) {
41-
is := ErrReconciler(test.err)
41+
is := Err(test.err)
4242
assert.Equal(t, test.is, is)
4343
})
4444
}

0 commit comments

Comments
 (0)