mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
17 lines
283 B
Go
17 lines
283 B
Go
package bencode
|
|
|
|
import (
|
|
"reflect"
|
|
"unsafe"
|
|
)
|
|
|
|
// Wow Go is retarded.
|
|
var (
|
|
marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
|
|
unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem()
|
|
)
|
|
|
|
func bytesAsString(b []byte) string {
|
|
return *(*string)(unsafe.Pointer(&b))
|
|
}
|