Very nice looking tests!
Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
parent
3b41c9dd5f
commit
c1a45bf8e3
149 changed files with 1241 additions and 443 deletions
9
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
9
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
|
@ -1,10 +1,9 @@
|
|||
package reflect2
|
||||
|
||||
import (
|
||||
"github.com/modern-go/concurrent"
|
||||
"reflect"
|
||||
"unsafe"
|
||||
|
||||
"github.com/modern-go/concurrent"
|
||||
)
|
||||
|
||||
type Type interface {
|
||||
|
@ -137,7 +136,7 @@ type frozenConfig struct {
|
|||
func (cfg Config) Froze() *frozenConfig {
|
||||
return &frozenConfig{
|
||||
useSafeImplementation: cfg.UseSafeImplementation,
|
||||
cache: concurrent.NewMap(),
|
||||
cache: concurrent.NewMap(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,8 +291,8 @@ func UnsafeCastString(str string) []byte {
|
|||
stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str))
|
||||
sliceHeader := &reflect.SliceHeader{
|
||||
Data: stringHeader.Data,
|
||||
Cap: stringHeader.Len,
|
||||
Len: stringHeader.Len,
|
||||
Cap: stringHeader.Len,
|
||||
Len: stringHeader.Len,
|
||||
}
|
||||
return *(*[]byte)(unsafe.Pointer(sliceHeader))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue