1
0
Fork 0

Update to go1.22

Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
This commit is contained in:
Ludovic Fernandez 2024-02-07 17:14:07 +01:00 committed by GitHub
parent e11ff98608
commit d5cb9b50f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 4189 additions and 3419 deletions

View file

@ -1,7 +1,7 @@
package tcp
import (
"fmt"
"errors"
)
// Constructor A constructor for a piece of TCP middleware.
@ -29,7 +29,7 @@ func NewChain(constructors ...Constructor) Chain {
// Then adds an handler at the end of the chain.
func (c Chain) Then(h Handler) (Handler, error) {
if h == nil {
return nil, fmt.Errorf("cannot add a nil handler to the chain")
return nil, errors.New("cannot add a nil handler to the chain")
}
for i := range c.constructors {