diff --git a/README.md b/README.md index 770d5c9..2f3786e 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ func main() { pool, _ := ants.NewPoolWithFunc(100, func(payload interface{}) { request, ok := payload.(Request) if !ok { - request = Request{Result: make(chan []byte)} + request = Request{Param:[]byte(""), Result: make(chan []byte)} } reverseParam := func(s []byte) []byte { for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { diff --git a/README_ZH.md b/README_ZH.md index 2fd8884..871dd34 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -120,7 +120,7 @@ func main() { pool, _ := ants.NewPoolWithFunc(100, func(payload interface{}) { request, ok := payload.(Request) if !ok { - request = Request{Result: make(chan []byte)} + request = Request{Param:[]byte(""), Result: make(chan []byte)} } reverseParam := func(s []byte) []byte { for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { diff --git a/examples/http.go b/examples/http.go index 62b728a..56350c7 100644 --- a/examples/http.go +++ b/examples/http.go @@ -16,7 +16,7 @@ func main() { pool, _ := ants.NewPoolWithFunc(100, func(payload interface{}) { request, ok := payload.(Request) if !ok { - request = Request{Result: make(chan []byte)} + request = Request{Param:[]byte(""), Result: make(chan []byte)} } reverseParam := func(s []byte) []byte { for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {