snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
10
internal/websocket/convert_unsafe.go
Normal file
10
internal/websocket/convert_unsafe.go
Normal file
@@ -0,0 +1,10 @@
|
||||
//go:build !appengine
|
||||
|
||||
package websocket
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// StringToBytes converts string to byte slice.
|
||||
func stringToBytes(s string) []byte {
|
||||
return unsafe.Slice(unsafe.StringData(s), len(s)) //nolint:gosec // Audited.
|
||||
}
|
||||
Reference in New Issue
Block a user