当我使用
http.HandleFunc("/", serveRest) //serveRest is the method to handle request
http.ListenAndServe("localhost:4000", nil)
它将接受所有以 开头的请求"/"。我如何限制它只提供服务"localhost:4000"而不是每个地址"localhost:4000/*"?
你们能给我推荐一个好的 Go 教程吗?
相关分类