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() {
|
func main() {
|
||||||
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
||||||
request, ok := payload.(*Request)
|
request, ok := payload.(*Request)
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
|
@ -152,7 +152,7 @@ func main() {
|
||||||
}(request.Param)
|
}(request.Param)
|
||||||
|
|
||||||
request.Result <- reverseParam
|
request.Result <- reverseParam
|
||||||
})
|
})
|
||||||
defer pool.Release()
|
defer pool.Release()
|
||||||
|
|
||||||
http.HandleFunc("/reverse", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/reverse", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
@ -139,7 +139,7 @@ type Request struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
pool, _ := ants.NewPoolWithFunc(100000, func(payload interface{}) {
|
||||||
request, ok := payload.(*Request)
|
request, ok := payload.(*Request)
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
|
@ -152,7 +152,7 @@ func main() {
|
||||||
}(request.Param)
|
}(request.Param)
|
||||||
|
|
||||||
request.Result <- reverseParam
|
request.Result <- reverseParam
|
||||||
})
|
})
|
||||||
defer pool.Release()
|
defer pool.Release()
|
||||||
|
|
||||||
http.HandleFunc("/reverse", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/reverse", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
Loading…
Reference in New Issue