func saveHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, fmt.Errorf("internal server error"), http.StatusInternalServerError)
return
}
以上handler始终返回一个internal server error
的错误
func saveHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, fmt.Errorf("internal server error"), http.StatusInternalServerError)
return
}
以上handler始终返回一个internal server error
的错误
本文标题:golang http 返回error
本文链接:https://www.haomeiwen.com/subject/riqecxtx.html
网友评论