fix: golangci errors

This commit is contained in:
zarazaex69
2026-05-11 02:21:41 +03:00
parent 7be008b99e
commit 0723ddf2f5
50 changed files with 397 additions and 278 deletions
+3 -1
View File
@@ -12,6 +12,8 @@ import (
cryptopkg "github.com/openlibrecommunity/olcrtc/internal/crypto"
)
var errMuxBoom = errors.New("boom")
type stubLink struct {
mu sync.Mutex
canSend bool
@@ -163,7 +165,7 @@ func TestWriteReturnsErrClosedWhileWaiting(t *testing.T) {
func TestWriteWrapsSendError(t *testing.T) {
cipher := newTestCipher(t)
conn := New(&stubLink{canSend: true, sendErr: errors.New("boom")}, cipher)
conn := New(&stubLink{canSend: true, sendErr: errMuxBoom}, cipher)
_, err := conn.Write([]byte("payload"))
if err == nil || err.Error() != "send: boom" {