package main
import (
"io"
"net/http"
)
func main() {
http.HandleFunc("/", hello)
http.ListenAndServe(":8080", nil)
}
func hello(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "你好啊世界")
}
package main
import (
"io"
"net/http"
)
func main() {
http.HandleFunc("/", hello)
http.ListenAndServe(":8080", nil)
}
func hello(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "你好啊世界")
}
2 回答2.6k 阅读✓ 已解决
1 回答2.4k 阅读✓ 已解决
2 回答1.8k 阅读✓ 已解决
1 回答1.3k 阅读✓ 已解决
1 回答1.5k 阅读✓ 已解决
2 回答1.4k 阅读
1 回答1.8k 阅读
之前segmentfault是有篇文章介绍这个的,贴给你,可以看下
https://segmentfault.com/a/11...