dnslog 简单实现
This commit is contained in:
parent
1245ea1a08
commit
d9e7e06482
@ -4,17 +4,24 @@ import (
|
||||
"encoding/hex"
|
||||
gonanoid "github.com/matoous/go-nanoid"
|
||||
"matrix-common/pkg/logger"
|
||||
"time"
|
||||
|
||||
"fmt"
|
||||
"math"
|
||||
"net"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBatchLookup(t *testing.T) {
|
||||
for i := 0; i < 10; i++ {
|
||||
TestLookup(t)
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLookup(t *testing.T) {
|
||||
id, _ := gonanoid.Generate("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 6)
|
||||
originalText := strings.Repeat("1234567890", 66)
|
||||
originalText := time.Now().Format("2006-01-02 15:04:05.000")
|
||||
|
||||
text := hex.EncodeToString([]byte(originalText))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user