utils

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

utils

公共代码库

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayToString

func ArrayToString(a []int, delim string) string

func Bytes2String

func Bytes2String(b []byte) string

不要在使用[]byte(string) 或 string([]byte)这类类型转换 http://www.flysnow.org/2017/07/06/go-in-action-unsafe-pointer.html https://studygolang.com/articles/2909 unsafe.Pointer 类似 void*

func BytesPointer

func BytesPointer(b []byte) unsafe.Pointer

&b[0]

func CallStack

func CallStack(skip int) string

CallStack 获得调用堆栈

func DumpStacks

func DumpStacks()

DumpStacks 输出所有的goroutine的stack

func GetCallStack

func GetCallStack() string

func Join

func Join(a []interface{}, sep string) string

func ReverseString

func ReverseString(s string) string

func ReverseWords

func ReverseWords(s string) string

func String2Bytes

func String2Bytes(s string) []byte

func StringPointer

func StringPointer(s string) unsafe.Pointer

&s[0]

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