aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Holford <tomholford@users.noreply.github.com>2025-05-04 18:49:03 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2025-05-05 15:10:08 +0200
commit77b6c824a8225328aebca78eba676ea7eb606a69 (patch)
treea5f3f7614d0b7f83b4fb1ecc3a0e45ef9999d3a9
parenttun: darwin: fetch flags and mtu from if_msghdr directly (diff)
downloadwireguard-go-77b6c824a8225328aebca78eba676ea7eb606a69.tar.xz
wireguard-go-77b6c824a8225328aebca78eba676ea7eb606a69.zip
global: replaced unused function params with _
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--conn/errors_default.go2
-rw-r--r--conn/features_default.go2
-rw-r--r--device/allowedips_test.go2
-rw-r--r--device/sticky_default.go2
-rw-r--r--device/sticky_linux.go4
5 files changed, 6 insertions, 6 deletions
diff --git a/conn/errors_default.go b/conn/errors_default.go
index d967518..3c9b223 100644
--- a/conn/errors_default.go
+++ b/conn/errors_default.go
@@ -7,6 +7,6 @@
package conn
-func errShouldDisableUDPGSO(err error) bool {
+func errShouldDisableUDPGSO(_ error) bool {
return false
}
diff --git a/conn/features_default.go b/conn/features_default.go
index cae2bea..9fc5088 100644
--- a/conn/features_default.go
+++ b/conn/features_default.go
@@ -10,6 +10,6 @@ package conn
import "net"
-func supportsUDPOffload(conn *net.UDPConn) (txOffload, rxOffload bool) {
+func supportsUDPOffload(_ *net.UDPConn) (txOffload, rxOffload bool) {
return
}
diff --git a/device/allowedips_test.go b/device/allowedips_test.go
index 9ef8a76..0ce45af 100644
--- a/device/allowedips_test.go
+++ b/device/allowedips_test.go
@@ -39,7 +39,7 @@ func TestCommonBits(t *testing.T) {
}
}
-func benchmarkTrie(peerNumber, addressNumber, addressLength int, b *testing.B) {
+func benchmarkTrie(peerNumber, addressNumber, _ int, b *testing.B) {
var trie *trieEntry
var peers []*Peer
root := parentIndirection{&trie, 2}
diff --git a/device/sticky_default.go b/device/sticky_default.go
index 1038256..22e1e15 100644
--- a/device/sticky_default.go
+++ b/device/sticky_default.go
@@ -7,6 +7,6 @@ import (
"golang.zx2c4.com/wireguard/rwcancel"
)
-func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
+func (device *Device) startRouteListener(_ conn.Bind) (*rwcancel.RWCancel, error) {
return nil, nil
}
diff --git a/device/sticky_linux.go b/device/sticky_linux.go
index 7307b7e..f23ff02 100644
--- a/device/sticky_linux.go
+++ b/device/sticky_linux.go
@@ -9,7 +9,7 @@
*
* Currently there is no way to achieve this within the net package:
* See e.g. https://github.com/golang/go/issues/17930
- * So this code is remains platform dependent.
+ * So this code remains platform dependent.
*/
package device
@@ -47,7 +47,7 @@ func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, er
return netlinkCancel, nil
}
-func (device *Device) routineRouteListener(bind conn.Bind, netlinkSock int, netlinkCancel *rwcancel.RWCancel) {
+func (device *Device) routineRouteListener(_ conn.Bind, netlinkSock int, netlinkCancel *rwcancel.RWCancel) {
type peerEndpointPtr struct {
peer *Peer
endpoint *conn.Endpoint