Skip to content

Commit

Permalink
Merge pull request #4 from joeybloggs/v1
Browse files Browse the repository at this point in the history
Add missing struct documentation + update test code for go vet
  • Loading branch information
deankarn committed Nov 10, 2015
2 parents 9e9d1f4 + 71e409f commit 5cff051
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ const (
errRecoveryString = "recovering from panic: %+v\nStack Trace:\n %s"
)

// ErrRecovery contains the error when a consumer goroutine needed to be recovers
type ErrRecovery struct {
s string
}

// Error prints recovery error
func (e *ErrRecovery) Error() string {
return e.s
}
Expand Down
3 changes: 1 addition & 2 deletions pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func TestPanicRecovery(t *testing.T) {
i := job.Params()[0].(int)
if i == 1 {
panic("OMG OMG OMG! something bad happened!")
return
}
time.Sleep(time.Second * 1)
job.Return(i)
Expand All @@ -135,7 +134,7 @@ func TestPanicRecovery(t *testing.T) {
err, ok := result.(*ErrRecovery)
if ok {
count++
err.Error()
NotEqual(t, len(err.Error()), 0)
}
}

Expand Down

0 comments on commit 5cff051

Please sign in to comment.