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
6
vendor/github.com/modern-go/concurrent/log.go
generated
vendored
6
vendor/github.com/modern-go/concurrent/log.go
generated
vendored
|
@ -1,13 +1,13 @@
|
|||
package concurrent
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"log"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
// ErrorLogger is used to print out error, can be set to writer other than stderr
|
||||
var ErrorLogger = log.New(os.Stderr, "", 0)
|
||||
|
||||
// InfoLogger is used to print informational message, default to off
|
||||
var InfoLogger = log.New(ioutil.Discard, "", 0)
|
||||
var InfoLogger = log.New(ioutil.Discard, "", 0)
|
2
vendor/github.com/modern-go/concurrent/unbounded_executor.go
generated
vendored
2
vendor/github.com/modern-go/concurrent/unbounded_executor.go
generated
vendored
|
@ -3,11 +3,11 @@ package concurrent
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"sync"
|
||||
"time"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
// HandlePanic logs goroutine panic by default
|
||||
|
|
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