chore: fix revive issues

This commit is contained in:
galargh
2025-06-11 10:00:47 +01:00
parent a0c9fdf2b3
commit 50f065b4df
80 changed files with 209 additions and 209 deletions
+2 -2
View File
@@ -541,7 +541,7 @@ func (h *BasicHost) EventBus() event.Bus {
//
// (Thread-safe)
func (h *BasicHost) SetStreamHandler(pid protocol.ID, handler network.StreamHandler) {
h.Mux().AddHandler(pid, func(p protocol.ID, rwc io.ReadWriteCloser) error {
h.Mux().AddHandler(pid, func(_ protocol.ID, rwc io.ReadWriteCloser) error {
is := rwc.(network.Stream)
handler(is)
return nil
@@ -554,7 +554,7 @@ func (h *BasicHost) SetStreamHandler(pid protocol.ID, handler network.StreamHand
// SetStreamHandlerMatch sets the protocol handler on the Host's Mux
// using a matching function to do protocol comparisons
func (h *BasicHost) SetStreamHandlerMatch(pid protocol.ID, m func(protocol.ID) bool, handler network.StreamHandler) {
h.Mux().AddHandlerWithFunc(pid, m, func(p protocol.ID, rwc io.ReadWriteCloser) error {
h.Mux().AddHandlerWithFunc(pid, m, func(_ protocol.ID, rwc io.ReadWriteCloser) error {
is := rwc.(network.Stream)
handler(is)
return nil