强大的Go开发服务器简单例子
强大的Go开发服务器简单例子
强大的Go开发服务器简单例子:
packagemain
import"net/http"
funcSayHello(whttp.ResponseWriter,r*http.Request){
w.Write([]byte("hello"))
}
funcmain(){
http.HandleFunc("/hello",SayHello())
http.ListenAndServe(":1234",nil)
}
listenAndServer进行端口的监听
handlefunc进行注册路径的处理函数
处理函数为sayhello
如何为Linux安装Go语言
Linux系统入门学习-在Linux中安装Go语言
Ubuntu 安装Go语言包
《Go语言编程》高清完整版电子书
Go语言并行之美 -- 超越 “Hello World”
我为什么喜欢Go语言
Go语言内存分配器的实现
本文永久更新链接地址:
评论暂时关闭