package
0.0.0-20170403140351-21d4febd4bca
Repository: https://github.com/sirbu/golang-common.git
Documentation: pkg.go.dev
# Functions
GetHTTPHost returns the currenthost in the request.
GetHTTPUrl returns the url in the request.
JSONResponse writes JSON to an http.ResponseWriter with the corresponding status code.
ParseRequest takes the input body from the passed request and tries to unmarshal it into data.
RemoteAddr extracts the remote address of the request, taking into account proxy headers.
RemoteIP extracts the remote IP of the request, taking into account proxy headers.
# Variables
ErrInvalidContentType is returned by ParseRequest if it can't unmarshal it into the passed struct.