yxh 6 лет назад
Родитель
Сommit
218dc2fd0e
2 измененных файлов с 7 добавлено и 18 удалено
  1. 2 2
      go.mod
  2. 5 16
      test/demo2_test.go

+ 2 - 2
go.mod

@@ -2,8 +2,8 @@ module gfast
 
 require (
 	github.com/casbin/casbin/v2 v2.1.2
-	github.com/goflyfox/gtoken v1.3.9
-	github.com/gogf/gf v1.11.4
+	github.com/goflyfox/gtoken v1.3.11
+	github.com/gogf/gf v1.11.5
 	github.com/mojocn/base64Captcha v1.3.0
 )
 

+ 5 - 16
test/demo2_test.go

@@ -1,8 +1,9 @@
 package test
 
 import (
+	"fmt"
+	"github.com/gogf/gf/util/grand"
 	"testing"
-	"time"
 )
 
 func TestDemo2(t *testing.T) {
@@ -10,19 +11,7 @@ func TestDemo2(t *testing.T) {
 }
 
 func test21(t *testing.T) {
-	a := make(chan bool)
-	b := make(chan bool)
-	defer close(b)
-	go func() {
-		for {
-			select {
-			case <-a:
-			default:
-				<-b
-			}
-		}
-
-	}()
-	time.Sleep(1 * time.Second)
-	a <- true
+	for i := 0; i < 10; i++ {
+		fmt.Println(grand.Letters(10))
+	}
 }