refactor: apply go fix modernizers from Go 1.26 (#3463)

Co-authored-by: sukun <sukunrt@gmail.com>
This commit is contained in:
Andrew Gillis
2026-02-26 12:40:50 -10:00
committed by GitHub
parent 8a6fd5b923
commit e16f35e99a
131 changed files with 553 additions and 631 deletions
+2 -6
View File
@@ -6,6 +6,7 @@ import (
"fmt"
"io"
"reflect"
"slices"
"strings"
"sync"
"testing"
@@ -442,12 +443,7 @@ func TestHostProtoPreknowledge(t *testing.T) {
require.Never(t, func() bool {
protos, err := h1.Peerstore().GetProtocols(h2.ID())
require.NoError(t, err)
for _, p := range protos {
if p == "/foo" {
return true
}
}
return false
return slices.Contains(protos, "/foo")
}, time.Second, 100*time.Millisecond)
s, err := h1.NewStream(context.Background(), h2.ID(), "/foo", "/bar", "/super")