Documentation ¶
Overview ¶
Package utils provides utilities for the glue socket implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalValues ¶
MarshalValues joins two values into a single string. They can be decoded by the UnmarshalValues function.
func RemoteAddress ¶
RemoteAddress returns the IP address of the request. If the X-Forwarded-For or X-Real-Ip http headers are set, then they are used to obtain the remote address. The boolean is true, if the remote address is obtained using the request RemoteAddr() method.
func RemovePortFromRemoteAddr ¶
RemovePortFromRemoteAddr removes the port if present from the remote address.
func UnmarshalValues ¶
UnmarshalValues splits two values from a single string. This function is chainable to extract multiple values.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.