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 (
16
16
// to be in little endian.
17
17
//
18
18
// See https://github.com/golang/go/issues/31586
19
- //
20
- //lint:ignore U1000 mask.go
21
19
func maskGo (b []byte , key uint32 ) uint32 {
22
20
if len (b ) >= 8 {
23
21
key64 := uint64 (key )<< 32 | uint64 (key )
Original file line number Diff line number Diff line change 3
3
package websocket
4
4
5
5
func 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
+ */
10
14
}
11
15
12
16
// @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 {
18
22
// See https://github.com/nhooyr/websocket/pull/326#issuecomment-1771138049
19
23
//
20
24
//go:noescape
25
+ //lint:ignore U1000 disabled till v1.9.0
21
26
func maskAsm (b * byte , len int , key uint32 ) uint32
You can’t perform that action at this time.
0 commit comments