File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 5
5
package f64s
6
6
7
7
import (
8
+ "errors"
8
9
"fmt"
9
10
"math/rand"
10
11
"reflect"
@@ -35,9 +36,9 @@ func TestMap(t *testing.T) {
35
36
36
37
func TestTake (t * testing.T ) {
37
38
var (
38
- errLength = fmt . Errorf ("sliceop: length mismatch" )
39
- errSortedIndices = fmt . Errorf ("sliceop: indices not sorted" )
40
- errDuplicateIndices = fmt . Errorf ("sliceop: duplicate indices" )
39
+ errLength = errors . New ("sliceop: length mismatch" )
40
+ errSortedIndices = errors . New ("sliceop: indices not sorted" )
41
+ errDuplicateIndices = errors . New ("sliceop: duplicate indices" )
41
42
)
42
43
43
44
for _ , tc := range []struct {
Original file line number Diff line number Diff line change 8
8
// slices package.
9
9
package sliceop // import "go-hep.org/x/hep/sliceop"
10
10
11
- import (
12
- "fmt"
13
- )
11
+ import "errors"
14
12
15
13
var (
16
- errLength = fmt . Errorf ("sliceop: length mismatch" )
17
- errSortedIndices = fmt . Errorf ("sliceop: indices not sorted" )
18
- errDuplicateIndices = fmt . Errorf ("sliceop: duplicate indices" )
14
+ errLength = errors . New ("sliceop: length mismatch" )
15
+ errSortedIndices = errors . New ("sliceop: indices not sorted" )
16
+ errDuplicateIndices = errors . New ("sliceop: duplicate indices" )
19
17
)
20
18
21
19
// Filter creates a slice with all the elements x_i of src for which f(x_i) is true.
You can’t perform that action at this time.
0 commit comments