Skip to content

Commit b198624

Browse files
committed
Fix for 1.18-rc1
1 parent dfd28b3 commit b198624

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ jobs:
1414
- uses: actions/setup-go@v2
1515
with:
1616
stable: "false"
17-
go-version: "1.18.0-beta2"
17+
go-version: "1.18.0-rc1"
1818
- run: go test -v ./...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A general purpose library offering functional helpers for Golang.
44

5-
_*Note: this library requires Go 1.18, which is currently in beta.*_
5+
_*Note: this library requires Go 1.18, which is currently a release candidate.*_
66

77
```go
88
// Find the first 5 prime numbers

constraints/constraints.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package constraints
2+
3+
type Signed interface {
4+
~int | ~int8 | ~int16 | ~int32 | ~int64
5+
}
6+
7+
type Unsigned interface {
8+
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
9+
}
10+
11+
type Integer interface {
12+
Signed | Unsigned
13+
}
14+
15+
type Float interface {
16+
~float32 | ~float64
17+
}
18+
19+
type Ordered interface {
20+
Integer | Float | ~string
21+
}

internal/assert/assert.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ func False(t *testing.T, b bool) {
2929
func Nil(t *testing.T, v interface{}) {
3030
t.Helper()
3131

32-
Equal(t, v, nil)
32+
if v != nil {
33+
t.Errorf("expected `%v` to equal `nil`", v)
34+
}
3335
}
3436

3537
func NotNil(t *testing.T, v interface{}) {

iter/filters/filters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package filters
22

3-
import "constraints"
3+
import "github.com/BooleanCat/go-functional/constraints"
44

55
// IsZero is a filter intended for use with iter.Filter that returns true when
66
// the provided value is equal to its zero value.

iter/ops/ops.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package ops
22

33
import (
4-
"constraints"
5-
4+
"github.com/BooleanCat/go-functional/constraints"
65
"github.com/BooleanCat/go-functional/option"
76
"github.com/BooleanCat/go-functional/result"
87
)

0 commit comments

Comments
 (0)