Documentation
¶
Index ¶
- Constants
- func AddError(err error, str string) error
- func AnyBytes64ToStr(b []byte) string
- func AnyStrToBytes64(str string) []byte
- func Arange(start, stop, step int) []int
- func ArangeStr(start, stop, step int) []string
- func BoolPtr(b bool) *bool
- func Bytes64ToAnyStr(b []byte) string
- func BytesToReader(b []byte) io.Reader
- func BytesToUint8s(bs []byte) []uint8
- func CancelContext() (context.Context, context.CancelFunc)
- func CancelTimerContext(t time.Duration) (context.Context, context.CancelFunc)
- func CheckError(err error)
- func ConstTimeBytesEqual(b1, b2 []byte) bool
- func ExeDirPath() string
- func GenRandomBytes(length int) []byte
- func GenUniqueID(length int, step int) string
- func GetOsTimeZones() []string
- func IntPtr(n int) *int
- func MapContainMap(m1, m2 map[string][]byte) bool
- func Marshal(objWithPublicMembers interface{}) ([]byte, error)
- func NewContext() context.Context
- func NewError(a ...interface{}) error
- func PathJoin(base string, adders ...string) string
- func PrintError(err error)
- func RaiseError(a ...interface{})
- func RandInt(max int) int
- func ReaderToBytes(reader io.Reader) []byte
- func SignalContext() (context.Context, context.CancelFunc)
- func StrPtr(s string) *string
- func StrSliceContain(sl []string, elem string) bool
- func StrToAnyBytes64(str string) []byte
- func Uint8sToBytes(u8s []uint8) []byte
- func Unmarshal(b []byte, objWithPublicMembers interface{}) error
- func WithSignal(ctx context.Context) (context.Context, context.CancelFunc)
- type TimeInfo
Constants ¶
View Source
const Layout = "2006-1-2 15:4"
Variables ¶
This section is empty.
Functions ¶
func AnyBytes64ToStr ¶
func AnyStrToBytes64 ¶
func Bytes64ToAnyStr ¶
func BytesToReader ¶
func BytesToUint8s ¶
func CancelContext ¶
func CancelContext() (context.Context, context.CancelFunc)
func CancelTimerContext ¶
func CheckError ¶
func CheckError(err error)
func ConstTimeBytesEqual ¶
func ExeDirPath ¶
func ExeDirPath() string
func GenRandomBytes ¶
func GenUniqueID ¶
func GetOsTimeZones ¶
func GetOsTimeZones() []string
https://stackoverflow.com/questions/40120056/get-a-list-of-valid-time-zones-in-go
func NewContext ¶
func PrintError ¶
func PrintError(err error)
func RaiseError ¶
func RaiseError(a ...interface{})
func ReaderToBytes ¶
func SignalContext ¶
func SignalContext() (context.Context, context.CancelFunc)
func StrSliceContain ¶
func StrToAnyBytes64 ¶
func Uint8sToBytes ¶
func WithSignal ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.