當(dāng)我使用http.HandleFunc("/", serveRest) //serveRest is the method to handle requesthttp.ListenAndServe("localhost:4000", nil)它將接受所有以 開(kāi)頭的請(qǐng)求"/"。我如何限制它只提供服務(wù)"localhost:4000"而不是每個(gè)地址"localhost:4000/*"?你們能給我推薦一個(gè)好的 Go 教程嗎?
- 2 回答
- 0 關(guān)注
- 177 瀏覽
添加回答
舉報(bào)
0/150
提交
取消