标签:int splay pack false otto net fun spl data
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", sayhelloName) //设置访问的路由
err := http.ListenAndServe(":8080", nil) //设置监听的端口
if err != nil {
log.Fatal("ListenAndServe: ", err)
}
}
func sayhelloName(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello Wrold!") //这个写入到w的是输出到客户端的
}
标签:int splay pack false otto net fun spl data
原文地址:https://www.cnblogs.com/hualou/p/12070019.html