utils

package
v0.0.0-...-13b6049 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

** description(""). ** copyright('tuoyun,www.tuoyun.net'). ** author("fg,Gordon@tuoyun.net"). ** time(2021/4/8 15:09).

Index

Constants

View Source
const (
	//Platform ID
	IOSPlatformID     = 1
	AndroidPlatformID = 2
	WindowsPlatformID = 3
	OSXPlatformID     = 4
	WebPlatformID     = 5
	MiniWebPlatformID = 6
	LinuxPlatformID   = 7

	//Platform string match to Platform ID
	IOSPlatformStr     = "IOS"
	AndroidPlatformStr = "Android"
	WindowsPlatformStr = "Windows"
	OSXPlatformStr     = "OSX"
	WebPlatformStr     = "Web"
	MiniWebPlatformStr = "MiniWeb"
	LinuxPlatformStr   = "Linux"

	//terminal types
	TerminalPC     = "PC"
	TerminalMobile = "Mobile"
)

Variables

View Source
var ServerIP = ""

Functions

func IntToString

func IntToString(i int) string

func InterfaceArrayToStringArray

func InterfaceArrayToStringArray(data []interface{}) (i []string)

func IsContain

func IsContain(target string, List []string) bool

judge a string whether in the string list

func JsonStringToStruct

func JsonStringToStruct(s string, args interface{}) error

The incoming parameter must be a pointer

func PlatformIDToName

func PlatformIDToName(num int32) string

func PlatformNameToClass

func PlatformNameToClass(name string) string

func PlatformNameToID

func PlatformNameToID(name string) int32

func StringToInt

func StringToInt(i string) int

func StringToInt64

func StringToInt64(i string) int64

func StructToJsonString

func StructToJsonString(param interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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