Extractors implemented. Exporters name simplified. README Updated for extracting data. Removed go 1.11 support
This commit is contained in:
17
middleware_test.go
Normal file
17
middleware_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package geziyor
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestRandomDelay(t *testing.T) {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
delay := time.Millisecond * 1000
|
||||
min := float64(delay) * 0.5
|
||||
max := float64(delay) * 1.5
|
||||
randomDelay := rand.Intn(int(max-min)) + int(min)
|
||||
fmt.Println(time.Duration(randomDelay))
|
||||
}
|
||||
Reference in New Issue
Block a user