Documentation ¶
Index ¶
- func ExtractHostPort(addr string) (string, int, error)
- func FilterKeep[T any](arr []T, function func(value T) bool) []T
- func GetProxyDialer(proxyStringOrEmpty string, uncertainTimeout time.Duration) (proxy.Dialer, error)
- func InitFs()
- func Map[T any, E any](arr []T, function func(value T) E) []E
- func MustCheckExist(filePath string) bool
- func MustLipPath(pathSeg ...string) string
- func RemoveProtocol(addr string) (host string, port int)
- func Ternary[T any](expression bool, trueResult T, falseResult T) T
- func TransposeMatrix[T any](matrix [][]T) [][]T
- func WriteTable(matrix [][]string, writer io.Writer, reverse bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterKeep ¶
func GetProxyDialer ¶
func GetProxyDialer(proxyStringOrEmpty string, uncertainTimeout time.Duration) (proxy.Dialer, error)
GetProxyDialer returns a proxy.Dialer with timeout. Note that we should convert it into proxy.ContextDialer to ensure a timeout.
func MustCheckExist ¶
func MustLipPath ¶
func RemoveProtocol ¶
func TransposeMatrix ¶
func TransposeMatrix[T any](matrix [][]T) [][]T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.