util

package
v0.0.0-...-8667f16 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBuf

func CopyBuf(buf []byte) []byte

func CopyIO

func CopyIO(dst io.WriteCloser, src io.ReadCloser)

func DecodeBase64

func DecodeBase64(str string) (string, error)

DecodeBase64 base64 string.

func EncodeBase64

func EncodeBase64(str string) string

EncodeBase64 string using base64.

func GetCurrentPath

func GetCurrentPath() string

GetCurrentPath return the path of the executable file.

func IsDomain

func IsDomain(host string) bool

IsDomain detect if value match the format of domain.

func IsIPv4

func IsIPv4(ip net.IP) bool

IsIPv4 detect if ip is ipv4.

func IsIPv6

func IsIPv6(ip net.IP) bool

IsIPv6 detect if ip is ipv6.

func IsValidHost

func IsValidHost(str string) bool

IsValidHost detect if host is valid.

func Lookup

func Lookup(host string, ipv6 bool) (net.IP, error)

Lookup return ip address of host.

func RandomUint32

func RandomUint32() uint32

func RandomUint32String

func RandomUint32String() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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