utils

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToString added in v0.6.1

func AnyToString(row any) string

func BytesToString added in v0.6.1

func BytesToString(b []byte) string

https://github.com/golang/go/issues/53003

func Caller added in v0.6.1

func Caller(skip int) string

返回调用者的"package/frame.File:frame.Line"

func MapToString added in v0.6.1

func MapToString(recordMap map[string]string, sorted bool) string

func ResolveSockaddr added in v0.6.1

func ResolveSockaddr(network string, address string) (syscall.Sockaddr, error)

func ResolveSockaddrIP added in v0.6.1

func ResolveSockaddrIP(addr syscall.Sockaddr) (string, error)

func SetSocketBlock added in v0.6.1

func SetSocketBlock(fd int) error

func SetSocketCloseExec added in v0.6.1

func SetSocketCloseExec(fd int)

func SetSocketKeepAlive added in v0.6.1

func SetSocketKeepAlive(fd int) error

func SetSocketNonBlock added in v0.6.1

func SetSocketNonBlock(fd int) error

func SetSocketReUsePort added in v0.6.1

func SetSocketReUsePort(fd int) error

func SetSocketRecvBufSize added in v0.6.1

func SetSocketRecvBufSize(fd int, bufSize int) error

func SetSocketReuseaddr added in v0.6.1

func SetSocketReuseaddr(fd int) error

func SetSocketSendBufSize added in v0.6.1

func SetSocketSendBufSize(fd int, bufSize int) error

func SetSocketTCPNodelay added in v0.6.1

func SetSocketTCPNodelay(fd int) error

func StringToBytes added in v0.6.1

func StringToBytes(s string) []byte

func StringToMap added in v0.6.1

func StringToMap(data string, fieldSep string, valueSep string) map[string]string

func UpdateGOMAXPROCS added in v0.6.1

func UpdateGOMAXPROCS(printf func(formatter string, args ...any), interval time.Duration) func()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL