File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ import (
1616// to be in little endian.
1717//
1818// See https://github.com/golang/go/issues/31586
19- //
20- //lint:ignore U1000 mask.go
2119func maskGo (b []byte , key uint32 ) uint32 {
2220 if len (b ) >= 8 {
2321 key64 := uint64 (key )<< 32 | uint64 (key )
Original file line number Diff line number Diff line change 33package websocket
44
55func mask (b []byte , key uint32 ) uint32 {
6- if len (b ) > 0 {
7- return maskAsm (& b [0 ], len (b ), key )
8- }
9- return key
6+ // TODO: Will enable in v1.9.0.
7+ return maskGo (b , key )
8+ /*
9+ if len(b) > 0 {
10+ return maskAsm(&b[0], len(b), key)
11+ }
12+ return key
13+ */
1014}
1115
1216// @nhooyr: I am not confident that the amd64 or the arm64 implementations of this
@@ -18,4 +22,5 @@ func mask(b []byte, key uint32) uint32 {
1822// See https://github.com/nhooyr/websocket/pull/326#issuecomment-1771138049
1923//
2024//go:noescape
25+ //lint:ignore U1000 disabled till v1.9.0
2126func maskAsm (b * byte , len int , key uint32 ) uint32
You can’t perform that action at this time.
0 commit comments