08 2014 档案

摘要://http.Handlertype Handler interface { ServeHTTP(ResponseWriter, *Request)}type HandlerFunc func(ResponseWriter, *Request)func (HandlerFunc) ServeH... 阅读全文
posted @ 2014-08-12 14:17 梦想's技术人员 阅读(1819) 评论(0) 推荐(0)
摘要:package mainimport ( "io" "log" "net/http")func main() { http.HandleFunc("/", Cookie) http.HandleFunc("/2", Cookie2) http.ListenAndS... 阅读全文
posted @ 2014-08-11 23:30 梦想's技术人员 阅读(323) 评论(0) 推荐(0)
摘要:FileServer文档:https://godoc.org/net/http#FileServer今天看到http的 Handle 方法,所以就像试试,就找到FileServerFileServer: 1.www.xx.com/ 根路径 直接使用 http.Handle("/",... 阅读全文
posted @ 2014-08-02 23:02 梦想's技术人员 阅读(6041) 评论(0) 推荐(0)