From 697a03010526bcb4ca2296c0789aecd1ded59963 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Sun, 2 Dec 2018 22:03:18 +0800 Subject: [PATCH] add the usage of integrating with http server --- README.md | 2 +- README_ZH.md | 2 +- examples/http.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 {