Documentation
¶
Index ¶
- Variables
- func Decimal2IP(n int64) string
- func Decimal2IP0(n int64) (ip string, err error)
- func Decimal2IP1(n int64) string
- func Distance(lng1, lat1, lng2, lat2 float64) float64
- func IP2Decimal(ipstr string) (int64, error)
- func IP2Decimal0(ip string) (n int64, err error)
- func IP2Decimal1(ipstr string) (int64, error)
- func IsBankCard(n int64) (ok bool, err error)
- func IsChineseID(s string) (ok bool, err error)
- func IsChineseWords(words string) (ok bool, err error)
- func IsEmail(email string) (ok bool, err error)
- func JSON(w http.ResponseWriter, v interface{})
- func NewBytesPool(n int) sync.Pool
- func Random(min, max int64) int64
- func RandomNumber() (i int64)
- func ReadJSON(r *http.Request, o interface{}) error
- type CIDRInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var BP12 = NewBytesPool(12)
View Source
var BP16 = NewBytesPool(16)
View Source
var BP2 = NewBytesPool(2)
View Source
var BP20 = NewBytesPool(20)
View Source
var BP2048 = NewBytesPool(2048)
View Source
var BP32 = NewBytesPool(32)
View Source
var BP4 = NewBytesPool(4)
View Source
var BP40 = NewBytesPool(40)
View Source
var BP65507 = NewBytesPool(65507)
Functions ¶
func Decimal2IP ¶
Decimal2IP transform a decimal IP to x.x.x.x format.
func Decimal2IP0 ¶
Decimal2IP0 transform a decimal IP to x.x.x.x format. ref: https://zh.wikipedia.org/wiki/IPv4
func Decimal2IP1 ¶
Decimal2IP1 transform a decimal IP to x.x.x.x format.
func IP2Decimal ¶
IP2Decimal transform ip format like x.x.x.x to decimal.
func IP2Decimal0 ¶
IP2Decimal0 transform ip format like x.x.x.x to decimal. ref: https://zh.wikipedia.org/wiki/IPv4
func IP2Decimal1 ¶
IP2Decimal1 transform ip format like x.x.x.x to decimal.
func IsBankCard ¶
IsBankCard determine whether it is bankcard number
func IsChineseID ¶
IsChineseID determine whether it is Chinese ID Card Number
func IsChineseWords ¶
IsChineseWords determine whether it is Chinese words Notice: NOT ALL
func JSON ¶
func JSON(w http.ResponseWriter, v interface{})
func NewBytesPool ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.