Documentation ¶
Index ¶
- func BytesToString(bytes []byte) string
- func GetFirstIP() (string, error)
- func GetFirstPrivateIP() (string, error)
- func GetPrivateIPList() ([]string, error)
- func IPtoUInt(ip string) uint32
- func IsPrivateIP(ip string) bool
- func JavaStringHash(s string) uint32
- func SnowFlakeID() string
- func StringToBytes(str string) []byte
- func UInt64UUID() (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFirstIP ¶
GetFirstIP gets the first IP of the current host
func GetFirstPrivateIP ¶
GetFirstPrivateIP gets the first private IP of the current host
func GetPrivateIPList ¶
GetPrivateIPList gets all the private IPs of the current host
func IsPrivateIP ¶
IsPrivateIP checks if an IP is a private one, according to some reserved inner IP rules, may be not suitable for all
func JavaStringHash ¶
JavaStringHash and Java String.hashCode() equivalent
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.