Skip to content

Commit

Permalink
Fix lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnteee committed May 12, 2022
1 parent 0b406e4 commit edb1783
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions actor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,21 @@ func TestActorAsk(t *testing.T) {
timeout = 10 * time.Millisecond

// Normal cases
actual = 0
expectedInt = 10
actual, _ = AskNewGenerics[interface{}, int](1).AskOnce(actorRoot, nil)
assert.Equal(t, expectedInt, actual)
// Ask with Timeout
actual = 0
expectedInt = 20
actual, _ = AskNewGenerics[interface{}, int](2).AskOnce(actorRoot, &timeout)
assert.Equal(t, expectedInt, actual)
// Ask channel
actual = 0
expectedInt = 30
ch := AskNewGenerics[interface{}, int](3).AskChannel(actorRoot)
actual = <-*ch
close(*ch)
assert.Equal(t, expectedInt, actual)

// Timeout cases
actual = 9999
expectedInt = 0
actual, err = AskNewGenerics[interface{}, int](-1).AskOnce(actorRoot, &timeout)
assert.Equal(t, expectedInt, actual)
Expand Down
3 changes: 1 addition & 2 deletions cor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ func logMessage(args ...interface{}) {
}

func TestCorYield(t *testing.T) {
var expectedInt int
actualInt := 0
var expectedInt, actualInt int
var testee *CorDef[interface{}]
var wg sync.WaitGroup

Expand Down
2 changes: 1 addition & 1 deletion fp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ func Flatten[T any](list ...[]T) []T {
return Concat(result, list...)
}

// Prepend returns the slice with the additional element added to the beggining
// Prepend returns the slice with the additional element added to the beginning
func Prepend[T any](element T, list []T) []T {
return append([]T{element}, list...)
}
Expand Down
2 changes: 1 addition & 1 deletion publisher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

func TestPublisher(t *testing.T) {
var s *Subscription[interface{}]
var p2 *PublisherDef[interface{}]
p := Publisher.New()
p2 := p

actual := 0
expected := 0
Expand Down

0 comments on commit edb1783

Please sign in to comment.