Documentation ¶
Index ¶
- Variables
- func AssignLocalAddr() (*net.TCPAddr, error)
- func BytesToString(b []byte) string
- func CErr(msg string) string
- func CInfo(msg string) string
- func CWarn(msg string) string
- func Decode(b []byte) []byte
- func GetLocalIP() string
- func GetPidByName(binName string) (int, string)
- func Json2SingleLayerMap(body []byte) (map[string]json.RawMessage, error)
- func MVFile(ori, des string) int
- func MkdirForce(dir string) int
- func PathExists(path string) bool
- func ReadFileBytes(confFile string) ([]byte, error)
- func ReadLines(confFile string) ([]string, error)
- func SetQuickAck(conn *net.TCPConn) error
- func StartDetached(cmd string, args []string) error
- func StringToBytes(s string) []byte
- func StripcSlashes(data []byte) []byte
- func TempFileWithSuffix(dir, prefix, suffix string) (f *os.File, err error)
- func UnescapeSlash(ori []byte) []byte
- func WriteFile(fpath string, content []byte) error
- func WriteFileString(confFile, data string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var LocalIp = GetLocalIP()
View Source
var PortVal = "8998" //默认值,会被app.toml覆盖
Functions ¶
func AssignLocalAddr ¶
func BytesToString ¶
func GetLocalIP ¶
func GetLocalIP() string
func Json2SingleLayerMap ¶
func Json2SingleLayerMap(body []byte) (map[string]json.RawMessage, error)
json解析成单层map, 打平多层嵌套,多层嵌套通过"."连接key 对于数组采用数字作为key
func SetQuickAck ¶
func StartDetached ¶
func StringToBytes ¶
func StripcSlashes ¶
func TempFileWithSuffix ¶
TempFile creates a new temporary file in the directory dir with a name beginning with prefix, opens the file for reading and writing, and returns the resulting *os.File. If dir is the empty string, TempFile uses the default directory for temporary files (see os.TempDir). Multiple programs calling TempFile simultaneously will not choose the same file. The caller can use f.Name() to find the pathname of the file. It is the caller's responsibility to remove the file when no longer needed.
func UnescapeSlash ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.