标签:
把输出函数替换为w.Write即可。
func Action(w http.ResponseWriter, r *http.Request) { var result string //....................... // fmt.Fprintf(w, result) w.Write([]byte(result)) }
golang http.ResponseWriter valid json
标签:
原文地址:http://www.cnblogs.com/zhangqingping/p/4308124.html