添加在线调试 api
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
@@ -14,8 +13,9 @@ func main() {
|
||||
func mock() {
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
waiting := rand.Intn(450) + 50
|
||||
time.Sleep(time.Duration(waiting) * time.Millisecond)
|
||||
// waiting := rand.Intn(450) + 50
|
||||
// time.Sleep(time.Duration(waiting) * time.Millisecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
w.Write([]byte("Hello World"))
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user