Go 使用标准库 net/http 包构建服务器

01 概念 在 Go 语言中,使用标准库 net/http 可以很方便的构建服务器,只要调用 ListenAndServe 函数,并传入参数IP地址与端口组成的字符串和处理器(handler)即可。 func ListenAndServe(addr string, handler Handler) error 如果 IP 地址与端口组成的字符串参数为空字符串,...