tools

package
v0.0.0-...-8415a54 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 12 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GpsCalcTransform = func(v int64) float64 {
	_du := int64(v / 3600 / 100)
	_fen := int64((v - _du*3600*100) / 100 / 60)
	_miao := int64((v - _du*3600*100 - _fen*60*100) / 100)
	_latlon := float64(_du) + float64(_fen)/60 + float64(_miao)/60/60

	return _latlon
}

海康GPS转换公式

Functions

func GB2312ToUTF8

func GB2312ToUTF8(data []byte) (utf8Data []byte, err error)

将GB2312类型的XML数据转码成UTF-8类型

func GetAbsPath

func GetAbsPath() string

返回当前工作目录的绝对路径

func GetMD5String

func GetMD5String(data string) string

MD5加密,生成32位MD5字符串

func GetRangeNum

func GetRangeNum(min, max int64) int64

func GetUUID

func GetUUID() string

生成UUID

func HexToBigInt

func HexToBigInt(hex string) *big.Int

十六进制转十进制

func MkdirAllFile

func MkdirAllFile(path, appPath string) string

根据文件路径创建对应的文件夹

func ReverseString

func ReverseString(s string) string

字符串逆序

func StringsJoin

func StringsJoin(str ...string) string

字符串拼接

func UTF8ToGB2312

func UTF8ToGB2312(data []byte) (gb2312Data []byte, err error)

将UTF-8类型的XML数据转码成GB2312类型

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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