Documentation ¶
Index ¶
- Constants
- Variables
- func AddUint64ToSlice(slice []uint64, value uint64) []uint64
- func AddVersionInfoBeforeData(data []byte, version int32) []byte
- func Base64Decode(in string) string
- func Base64Encode(in string) string
- func BitIsSet(value uint32, position uint32) bool
- func BoolToString(input bool) string
- func Bresenham(x1, y1, x2, y2 int32) []int32
- func CheckBirthdayValid(nYear, nMonth, nDay int) bool
- func CheckIntersectSquareAndBeeline(square ChartCoordinate, beeline ChartCoordinate) bool
- func CheckProvinceValid(citizenNo []byte) bool
- func CheckTileidValid(id int32) bool
- func Clone(pb proto.Message) proto.Message
- func CombineMap(m1 ...map[string]string) map[string]string
- func ComputeInt32Slice(slice []int32) int32
- func ComputeUint32Slice(slice []uint32) uint32
- func ConverToInt(in interface{}) int
- func ConverToInt32(in interface{}) int32
- func ConverToInt64(in interface{}) int64
- func ConverToUint32(in interface{}) uint32
- func ConverToUint64(in interface{}) uint64
- func ConvertCoordinateToId(x int32, y int32, sid int32) int32
- func ConvertIdToCoordinate(id int32) (int32, int32, int32)
- func ConvertMainCityCoordinateToId(x, y uint32) uint32
- func ConvertMainCityIdToCoordinate(id uint32) (uint32, uint32)
- func ConvertToBytes(in interface{}) []byte
- func ConvertToString(in interface{}) string
- func CopyUint64Map(in map[uint64]uint64) map[uint64]uint64
- func CopyUint64Slice(input []uint64) []uint64
- func CountMarchDistance(startid, endid int32) uint64
- func Cross(p1x, p1y, p2x, p2y, p3x, p3y int32) int32
- func DelNum(a, b int32) int32
- func DeleteInt64ToSlice(slice []int64, value int64) []int64
- func DeleteUint32FromSlice(slice []uint32, value uint32) []uint32
- func DeleteUint64ToSlice(slice []uint64, value uint64) []uint64
- func Float64ToString(input float64) string
- func GenGuid() string
- func GetChunkIdx(tileId int32) int
- func GetCitizenNoInfo(citizenNo []byte) (err error, birthday time.Time, sex string, address string)
- func GetMd5String(s string) string
- func GetOccupyTileIDList(tileid, width, height int32) []int32
- func GetRandPerm(in int) []int
- func GetRandomLocation() int32
- func GetRandomNum(in int32) int32
- func GetSquareTileid(centerid, width, height int32) (int32, int32)
- func GetTileIdList(centerid, width, height int32) []int32
- func GetTileidByMarchTime(startid, endid int32, marchtime, totalmarchtime uint64) int32
- func GetValueByPR(pr, values []int32) (ret1 []int32)
- func InsertSplitK(u64 uint64) string
- func Int32MapNum(conf []int32, new *[]int32) (num int)
- func Int32SliceContant(slice *[]int32, value int32) bool
- func Int32ToString(input int32) string
- func Int64ToString(input int64) string
- func IsDirExists(path string) bool
- func IsFileExists(file string) bool
- func IsLeapYear(nYear int) bool
- func IsMobile(text string) bool
- func IsValidCitizenNo(citizenNo []byte) bool
- func IsValidCitizenNo18(citizenNo18 []byte) bool
- func Link(args ...interface{}) (ret string)
- func MapInit(input interface{})
- func Max(a, b int32) int32
- func MemSet(s unsafe.Pointer, c byte, n uintptr)
- func Min(a, b int32) int32
- func ParseParameterStringToMap(in string) map[string]string
- func ParseStringToFloat64List(input string) []float64
- func ParseStringToInt64List(input string) []int64
- func ParseStringToMap(input string) (map[uint64]uint64, map[uint64]uint64)
- func ParseStringToUint32List(input string) []uint32
- func ParseStringToUint64List(input string) []uint64
- func ProcessTime(duration uint64) string
- func ResetBit(value *uint32, position uint32)
- func Segment(p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y int32) bool
- func SetBit(value *uint32, position uint32)
- func StatueFuncArrayToMap(keys []string, values []uint32) map[string]uint32
- func StatueFuncArrayToString(keys []string, values []uint32, perValue uint32) string
- func StatueFuncMapToString(d map[string]string) string
- func StringFormatGtime(dateStr string) int64
- func StringSliceContant(slice []string, value string) bool
- func StringToBool(input string) bool
- func StringToFloat64(input string) float64
- func StringToInt(input string) int
- func StringToInt32(input string) int32
- func StringToInt64(input string) int64
- func StringToUint32(input string) uint32
- func StringToUint64(input string) uint64
- func StructInit(input interface{})
- func TimeFormatString(duration uint64) string
- func Uint32SliceContant(slice []uint32, value uint32) bool
- func Uint32ToString(input uint32) string
- func Uint64SliceContant(slice []uint64, value uint64) bool
- func Uint64ToString(input uint64) string
- type ChartCoordinate
- type PointCoordinate
Constants ¶
View Source
const ( MapLength int32 = 990 MapHeight int32 = 990 ChunkSize int32 = 30 MainCityLength uint32 = 200 MainCityHeight uint32 = 200 MainCitySize = MainCityLength * MainCityHeight WorldMainCityWidth int32 = 2 WorldMainCityHeight int32 = 2 )
Variables ¶
Functions ¶
func AddUint64ToSlice ¶
func Base64Decode ¶
func Base64Encode ¶
func BoolToString ¶
func CheckIntersectSquareAndBeeline ¶
func CheckIntersectSquareAndBeeline(square ChartCoordinate, beeline ChartCoordinate) bool
func CheckTileidValid ¶
func ComputeInt32Slice ¶
func ComputeUint32Slice ¶
func ConverToInt ¶
func ConverToInt(in interface{}) int
func ConverToInt32 ¶
func ConverToInt32(in interface{}) int32
func ConverToInt64 ¶
func ConverToInt64(in interface{}) int64
func ConverToUint32 ¶
func ConverToUint32(in interface{}) uint32
func ConverToUint64 ¶
func ConverToUint64(in interface{}) uint64
func ConvertToBytes ¶
func ConvertToBytes(in interface{}) []byte
func ConvertToString ¶
func ConvertToString(in interface{}) string
func CopyUint64Slice ¶
func CountMarchDistance ¶
func DeleteInt64ToSlice ¶
func DeleteUint32FromSlice ¶
func DeleteUint64ToSlice ¶
func Float64ToString ¶
func GetChunkIdx ¶
func GetCitizenNoInfo ¶
得到身份证号码,生日, 性别, 省份地址信息
func GetMd5String ¶
func GetOccupyTileIDList ¶
func GetRandPerm ¶
func GetRandomLocation ¶
func GetRandomLocation() int32
func GetRandomNum ¶
func GetSquareTileid ¶
func GetTileIdList ¶
func GetTileidByMarchTime ¶
func InsertSplitK ¶
func Int32MapNum ¶
---------------身份证 end-------------------- 对比切片
func Int32SliceContant ¶
func Int32ToString ¶
func Int64ToString ¶
func IsDirExists ¶
func IsFileExists ¶
func IsLeapYear ¶
func ParseStringToInt64List ¶
func ParseStringToUint32List ¶
func ParseStringToUint64List ¶
func ProcessTime ¶
func StatueFuncArrayToMap ¶
* @brief 雕像加成key-value array转换为map
func StatueFuncArrayToString ¶
* @brief 雕像加成key-value array转换为string
func StatueFuncMapToString ¶
func StringFormatGtime ¶
parse string(DATE) like 20170804 to UTC timestamp
func StringSliceContant ¶
func StringToBool ¶
func StringToFloat64 ¶
func StringToInt ¶
func StringToInt32 ¶
func StringToInt64 ¶
func StringToUint32 ¶
func StringToUint64 ¶
func StructInit ¶ added in v1.1.3
func StructInit(input interface{})
func TimeFormatString ¶
func Uint32SliceContant ¶
func Uint32ToString ¶
func Uint64SliceContant ¶
func Uint64ToString ¶
Types ¶
type ChartCoordinate ¶
type ChartCoordinate struct { Start PointCoordinate End PointCoordinate }
type PointCoordinate ¶
type PointCoordinate struct {
X, Y float64
}
Click to show internal directories.
Click to hide internal directories.