Golang Web Application
GoLang Web App基本设置
1.导入库
导入fmt和net/http,http建立一个/和编写一个indexPage的函数,fmt编写一个写Hello world!
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", indexPage)
http.ListenAndServe(":8000", nil)
}
func indexPage(writer http.ResponseWriter, request