From 956e6dd76b71fefb25a2da4c6312e14409986788 Mon Sep 17 00:00:00 2001 From: Kleissner Date: Mon, 11 Oct 2021 01:38:13 +0200 Subject: [PATCH] Sync reuseport sub-package to latest version --- go.mod | 1 - go.sum | 2 -- reuseport/README.md | 2 +- reuseport/control_unix.go | 1 + reuseport/control_wasm.go | 1 + reuseport/interface.go | 5 ++--- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 1c9c5d3..0ea057d 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.4.2 - github.com/pkg/errors v0.9.1 golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc golang.org/x/net v0.0.0-20210420210106-798c2154c571 golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988 diff --git a/go.sum b/go.sum index 8c18b9d..68a8df3 100644 --- a/go.sum +++ b/go.sum @@ -38,8 +38,6 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/reuseport/README.md b/reuseport/README.md index 8a39eff..2a2ba24 100644 --- a/reuseport/README.md +++ b/reuseport/README.md @@ -1,6 +1,6 @@ # reuseport -This is a fork from `https://github.com/libp2p/go-reuseport`. Last sync of changes: 16.03.2021 +This is a fork from `https://github.com/libp2p/go-reuseport`. Last sync of changes: 11.10.2021 **NOTE:** This package REQUIRES go >= 1.11. diff --git a/reuseport/control_unix.go b/reuseport/control_unix.go index 9f37d2c..0cc5da0 100644 --- a/reuseport/control_unix.go +++ b/reuseport/control_unix.go @@ -1,3 +1,4 @@ +//go:build !plan9 && !windows && !wasm // +build !plan9,!windows,!wasm package reuseport diff --git a/reuseport/control_wasm.go b/reuseport/control_wasm.go index d5d0a52..f37ed97 100644 --- a/reuseport/control_wasm.go +++ b/reuseport/control_wasm.go @@ -1,3 +1,4 @@ +//go:build wasm // +build wasm package reuseport diff --git a/reuseport/interface.go b/reuseport/interface.go index 64b48af..db6163a 100644 --- a/reuseport/interface.go +++ b/reuseport/interface.go @@ -19,9 +19,8 @@ package reuseport import ( "context" + "fmt" "net" - - "github.com/pkg/errors" ) // Available returns whether or not SO_REUSEPORT or equivalent behaviour is @@ -54,7 +53,7 @@ func ListenPacket(network, address string) (net.PacketConn, error) { func Dial(network, laddr, raddr string) (net.Conn, error) { nla, err := ResolveAddr(network, laddr) if err != nil { - return nil, errors.Wrap(err, "resolving local addr") + return nil, fmt.Errorf("failed to resolve local addr: %w", err) } d := net.Dialer{ Control: Control,