package
0.0.0-20160811013010-f9b7dc669fde
Repository: https://github.com/m3ng9i/go-utils.git
Documentation: pkg.go.dev
# Functions
return a secret function used for basic authentication, this function use sha1 hash.
Check a filename's extension and determine if it can be compressed.
Determine a data stream's content type, like: text/plain; charset=utf-8 Inspired by go's serveContent() in net/http package.
ErrorHandler401 return a function for writing 401 error message to http.ResponseWriter.
Determine a file's content type, like: text/plain; charset=utf-8 Inspired by go's serveContent() in net/http package.
Get client IP.
Wrap a handler to a gzip handler.
No description provided by the author
Make a new response sniffer, if recordBody is true, record response body to Body, this will cost more memory.
Get a value of key in query string.
RedirectToHTTPS redirect a request to a corresponding https url.
Create a function to generate random request ids.
Use golang.org/x/net/proxy package to make a socks5 client.
Write download header to the response writer.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ResponseSniffer is used to record http response body, status code and number of bytes write to the response writer.
# Type aliases
A string for identify each http request.