mirror of https://github.com/panjf2000/ants.git
Fix indent on README (#89)
This commit is contained in:
parent
f33679bb79
commit
88b5a85d64
|
@ -139,7 +139,7 @@ type Request struct {
|
|||
}
|
||||
|
||||
func main() {
|
||||
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
||||
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
||||
request, ok := payload.(*Request)
|
||||
if !ok {
|
||||
return
|
||||
|
@ -152,7 +152,7 @@ func main() {
|
|||
}(request.Param)
|
||||
|
||||
request.Result <- reverseParam
|
||||
})
|
||||
})
|
||||
defer pool.Release()
|
||||
|
||||
http.HandleFunc("/reverse", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
@ -139,7 +139,7 @@ type Request struct {
|
|||
}
|
||||
|
||||
func main() {
|
||||
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
||||
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
||||
request, ok := payload.(*Request)
|
||||
if !ok {
|
||||
return
|
||||
|
@ -152,7 +152,7 @@ func main() {
|
|||
}(request.Param)
|
||||
|
||||
request.Result <- reverseParam
|
||||
})
|
||||
})
|
||||
defer pool.Release()
|
||||
|
||||
http.HandleFunc("/reverse", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Reference in New Issue