Documentation ¶
Index ¶
- Constants
- func BD09toGCJ02(lon, lat float64) (float64, float64)
- func BD09toWGS84(lon, lat float64) (float64, float64)
- func Base64Decode(str string) (string, error)
- func Base64Encode(str string) string
- func Bytes2Mac(b []byte) string
- func BytesToInt(b []byte) int64
- func CamelCase(name string) string
- func ClientIp(r *http.Request) string
- func Crc32(str string) uint32
- func CurrentAbPath() string
- func FileExists(filename string) bool
- func FormatStrJson(b []byte) []byte
- func GCJ02toBD09(lon, lat float64) (float64, float64)
- func GCJ02toWGS84(lon, lat float64) (float64, float64)
- func GetDistance(lng1, lat1, lng2, lat2 float64) float64
- func IntToBytes(i interface{}) []byte
- func InternalIp(in string) bool
- func Ip2Location(in string) string
- func IsBuildRun() bool
- func IsJson(b []byte) bool
- func IsLocalIp(ip string) bool
- func Md5(str string) string
- func Md5File(path string) (string, error)
- func ParseMac(mac string) []byte
- func ParseTag(tag string) map[string]any
- func PasswordHash(password string) (string, error)
- func PasswordVerify(password, hash string) bool
- func RandFloat(min, max float64) float64
- func RandInt(min, max int64) int64
- func RandStr(length int) string
- func RecoverGo(f func(), recoverHandler func(err interface{}))
- func RedisLocker(client *xredis.Client, key string, retries int, ...) *xredis.RedisLocker
- func Request(r *http.Request) url.Values
- func Round(val float64, p int32) float64
- func ServerIP() (ip net.IP)
- func ServerMac() string
- func Sha1(str string) string
- func Sha1File(path string) (string, error)
- func StrArrayEmpty(arr []string) bool
- func UniqueInt64(data []int64) []int64
- func WGS84toBD09(lon, lat float64) (float64, float64)
- func WGS84toGCJ02(lon, lat float64) (float64, float64)
Constants ¶
View Source
const ( X_PI = math.Pi * 3000.0 / 180.0 OFFSET = 0.00669342162296594323 AXIS = 6378245.0 )
Variables ¶
This section is empty.
Functions ¶
func BD09toWGS84 ¶
BD09toWGS84 百度坐标系->WGS84坐标系
func Base64Decode ¶
func Base64Encode ¶
func BytesToInt ¶
func FormatStrJson ¶
func GCJ02toWGS84 ¶
GCJ02toWGS84 火星坐标系->WGS84坐标系
func GetDistance ¶
GetDistance 计算两个经纬度之间的距离, 参考链接:https://blog.csdn.net/gatieme/article/details/45599581 在线经纬度换算:https://tools.fun/distance.html 返回单位为:米
func IntToBytes ¶
func IntToBytes(i interface{}) []byte
func Ip2Location ¶
func PasswordHash ¶
func PasswordVerify ¶
func RedisLocker ¶ added in v1.22.1
func StrArrayEmpty ¶
func UniqueInt64 ¶
func WGS84toBD09 ¶
WGS84toBD09 WGS84坐标系->百度坐标系
func WGS84toGCJ02 ¶
WGS84toGCJ02 WGS84坐标系->火星坐标系
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.