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 BitsetEmpty(set []uint64) (empty bool)
- func BitsetGet(set []uint64, position uint) bool
- func BitsetInitialize(set []uint64)
- func BitsetSet(set []uint64, position uint, on bool) (changed bool)
- func BitsetUnion(set []uint64, other []uint64)
- func CopyFile(src string, dst string) (err error)
- 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 BitsetEmpty ¶ added in v0.12.0
BitsetEmpty returns whether the bitset is empty. This has false positives under concurrent modification (i.e., it can return true even though w.r.t. the sequence of atomic modifications, there was no point at which the bitset was completely empty), but that's not how we're using this method.
func BitsetInitialize ¶ added in v0.12.0
func BitsetInitialize(set []uint64)
BitsetInitialize initializes a bitset.
func BitsetSet ¶ added in v0.12.0
BitsetSet sets a given bit of the bitset to 0 or 1, returning whether it changed.
func BitsetUnion ¶ added in v0.12.0
BitsetUnion modifies `set` to be the union of `set` and `other`. This has race conditions in that we don't necessarily get a single consistent view of `other` across word boundaries.
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.