Documentation
¶
Index ¶
- Variables
- func AddrsEq(a, b net.Addr) bool
- func AddrsSameHost(a, b net.Addr) bool
- func CheckURLBoolKey(values map[string][]string, key string) (f bool, s bool)
- func ClosedNetworkErrToNil(err error) error
- func CopyBytes(src []byte) (dst []byte)
- func DialBlock(ctx context.Context, _, _ string) (net.Conn, error)
- func FirstNonNil(objs ...any) (obj any)
- func GetProxyFromEnvVar(scheme string) (val string)
- func IpEqual(a, b net.IP) bool
- func JoinNetErrors(a, b error) (err error)
- func LookupPortOffline(network, service string) (port int, err error)
- func NormalNet(network string) string
- func ParseScheme(scheme string) (base string, tls, ws bool)
- func ReadNullTerminatedString(r io.Reader, buf []byte) (string, error)
- func SplitHostPort(network, hostport string, defport uint16) (host string, port uint16)
- func WaitForClose(rc io.ReadCloser)
- func WriteAllSlices(w io.Writer, slices ...[]byte) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooLongString = errors.New("string is too long")
Functions ¶
func AddrsSameHost ¶
func CheckURLBoolKey ¶
func ClosedNetworkErrToNil ¶
func FirstNonNil ¶
func GetProxyFromEnvVar ¶
func JoinNetErrors ¶
func LookupPortOffline ¶
func ParseScheme ¶
base = "4" | "4a" | "5"
func ReadNullTerminatedString ¶
Should be cap(buf) >= 1
func SplitHostPort ¶
defport will be used as port if there is no port in hostport or it is invalid.
func WaitForClose ¶
func WaitForClose(rc io.ReadCloser)
Try to read until read fails, close rc, returns
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.