mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Adding a go version compatibility package.
Currently enables Errors.Is functionality as ErrorsIs. Using this functionality in errors.go and unit tests. Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
@@ -15,7 +15,6 @@ package server
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -583,7 +582,7 @@ func TestMaxControlLine(t *testing.T) {
|
||||
|
||||
pub := []byte("PUB foo.bar 11\r")
|
||||
err := c.parse(pub)
|
||||
if !errors.Is(err, ErrMaxControlLine) {
|
||||
if !IsErr(err, ErrMaxControlLine) {
|
||||
t.Fatalf("Expected an error parsing longer than expected control line")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user