示例#1
0
func main() {
	http.HandleFunc("/hello", HelloServer)
	err := http.ListenAndServer(":12345", nil)
	if err != nill {
		log.Fatal("ListenAndServer: ", err)
	}
}
示例#2
0
文件: main.go 项目: wcgh/go_read
func main() {
	http.HandlerFunc("/", indexHandler)
	http.HandlerFunc("/logout", logout)
	http.ListenAndServer("localhost:80", nil)

}