Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexHandle ¶
func IndexHandle(w http.ResponseWriter, r *http.Request)
IndexHandle for index page
func LogHandler ¶
LogHandler print request trace log
func StaticHandler ¶
StaticHandler serve public files, exclude folder
Types ¶
type ResponseLogger ¶
type ResponseLogger struct { StatusCode int // contains filtered or unexported fields }
ResponseLogger is a middleware used to keep an copy of Response.StatusCode.
func (*ResponseLogger) Header ¶
func (m *ResponseLogger) Header() http.Header
Header returns the header map that will be sent by WriteHeader. The Header map also is the mechanism with which Handlers can set HTTP trailers.
func (*ResponseLogger) Write ¶
func (m *ResponseLogger) Write(data []byte) (int, error)
Write writes the data to the connection as part of an HTTP reply.
func (*ResponseLogger) WriteHeader ¶
func (m *ResponseLogger) WriteHeader(status int)
WriteHeader sends an HTTP response header with status code. If WriteHeader is not called explicitly, the first call to Write will trigger an implicit WriteHeader(http.StatusOK). Thus explicit calls to WriteHeader are mainly used to send error codes.
Click to show internal directories.
Click to hide internal directories.