Documentation
¶
Index ¶
- func AddrIsLocal(addr net.Addr) bool
- func AddrIsUnix(addr net.Addr) bool
- func AddrLookupHostname(addr net.Addr) string
- func AddrToIP(addr net.Addr) net.IP
- func ArgsToStrings(maxLength int, arguments []string, delim string) []string
- func ExtractParam(line string) (string, string)
- func GetClientOnlyTags(tags map[string]ircmsg.TagValue) *map[string]ircmsg.TagValue
- func IPString(addr net.Addr) string
- func IsHostname(name string) bool
- func LookupHostname(addr string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddrIsLocal ¶ added in v0.11.0
AddrIsLocal returns whether the address is from a trusted local connection (loopback or unix).
func AddrIsUnix ¶ added in v0.11.0
AddrIsUnix returns whether the address is a unix domain socket.
func AddrLookupHostname ¶
AddrLookupHostname returns the hostname (if possible) or address for the given `net.Addr`.
func AddrToIP ¶ added in v0.11.0
AddrToIP returns the IP address for a net.Addr, or nil if it's a unix domain socket.
func ArgsToStrings ¶
ArgsToStrings takes the arguments and splits them into a series of strings, each argument separated by delim and each string bounded by maxLength.
func ExtractParam ¶ added in v0.11.0
ExtractParam extracts a parameter from the given string, returning the param and the rest of the string.
func GetClientOnlyTags ¶ added in v0.11.0
GetClientOnlyTags takes a tag map and returns a map containing just the client-only tags from it.
func IsHostname ¶
IsHostname returns whether we consider `name` a valid hostname.
func LookupHostname ¶
LookupHostname returns the hostname for `addr` if it has one. Otherwise, just returns `addr`.
Types ¶
This section is empty.