File tree 6 files changed +12
-12
lines changed
6 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 50
50
ErrVerifyFailed = errors .New ("verify: verify returned false" )
51
51
)
52
52
53
- // ErrKeys takes an error as an argument and returns
53
+ // Err takes an error as an argument and returns
54
54
// whether or not the error is one thrown by the keys package
55
- func ErrKeys (err error ) bool {
55
+ func Err (err error ) bool {
56
56
keyErrors := []error {
57
57
ErrPrivKeyUndecodable ,
58
58
ErrPrivKeyLengthInvalid ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import (
21
21
"github.com/stretchr/testify/assert"
22
22
)
23
23
24
- func TestErrKeys (t * testing.T ) {
24
+ func TestErr (t * testing.T ) {
25
25
var tests = map [string ]struct {
26
26
err error
27
27
is bool
@@ -38,7 +38,7 @@ func TestErrKeys(t *testing.T) {
38
38
39
39
for name , test := range tests {
40
40
t .Run (name , func (t * testing.T ) {
41
- is := ErrKeys (test .err )
41
+ is := Err (test .err )
42
42
assert .Equal (t , test .is , is )
43
43
})
44
44
}
Original file line number Diff line number Diff line change @@ -113,10 +113,10 @@ var (
113
113
}
114
114
)
115
115
116
- // ErrParser takes an error as an argument and returns
116
+ // Err takes an error as an argument and returns
117
117
// whether or not the error is one thrown by the asserter
118
118
// along with the specific source of the error
119
- func ErrParser (err error ) (bool , string ) {
119
+ func Err (err error ) (bool , string ) {
120
120
parserErrs := map [string ][]error {
121
121
"intent error" : IntentErrs ,
122
122
"match operations error" : MatchOpsErrs ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import (
20
20
"github.com/stretchr/testify/assert"
21
21
)
22
22
23
- func TestErrParser (t * testing.T ) {
23
+ func TestErr (t * testing.T ) {
24
24
var tests = map [string ]struct {
25
25
err error
26
26
is bool
@@ -40,7 +40,7 @@ func TestErrParser(t *testing.T) {
40
40
41
41
for name , test := range tests {
42
42
t .Run (name , func (t * testing.T ) {
43
- is , source := ErrParser (test .err )
43
+ is , source := Err (test .err )
44
44
assert .Equal (t , test .is , is )
45
45
assert .Equal (t , test .source , source )
46
46
})
Original file line number Diff line number Diff line change 45
45
ErrLiveBalanceLookupFailed = errors .New ("unable to lookup live balance" )
46
46
)
47
47
48
- // ErrReconciler takes an error as an argument and returns
48
+ // Err takes an error as an argument and returns
49
49
// whether or not the error is one thrown by the keys package
50
- func ErrReconciler (err error ) bool {
50
+ func Err (err error ) bool {
51
51
reconcilerErrors := []error {
52
52
ErrHeadBlockBehindLive ,
53
53
ErrAccountUpdated ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import (
21
21
"github.com/stretchr/testify/assert"
22
22
)
23
23
24
- func TestErrKeys (t * testing.T ) {
24
+ func TestErr (t * testing.T ) {
25
25
var tests = map [string ]struct {
26
26
err error
27
27
is bool
@@ -38,7 +38,7 @@ func TestErrKeys(t *testing.T) {
38
38
39
39
for name , test := range tests {
40
40
t .Run (name , func (t * testing.T ) {
41
- is := ErrReconciler (test .err )
41
+ is := Err (test .err )
42
42
assert .Equal (t , test .is , is )
43
43
})
44
44
}
You can’t perform that action at this time.
0 commit comments