标签:style blog http color for ar div line
//http.Handler
type Handler interface {
ServeHTTP(ResponseWriter, *Request)
}
type HandlerFunc func(ResponseWriter, *Request)
func (HandlerFunc) ServeHTTP
一般当创建一个如下的方法时,可通过http.HandlerFunc(name)转换为Handler类型,因为HanderFunc里有ServeHttp方法,实现了Handler接口
func name(rw ResponseWrite, r *Request){}
Go http.HandlerFunc(),布布扣,bubuko.com
标签:style blog http color for ar div line
原文地址:http://www.cnblogs.com/hellosun/p/3907199.html