guutil

package
v0.0.127 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.0.55

func Get(path string, header map[string]string) (string, bool)

func GoWithRecover

func GoWithRecover(f func())

func GzipBase64Marshall added in v0.0.91

func GzipBase64Marshall(source []byte) (string, bool)

func GzipBase64Unmarshall added in v0.0.91

func GzipBase64Unmarshall(source string) (string, bool)

func GzipCompress

func GzipCompress(source []byte) []byte

func GzipUncompress

func GzipUncompress(source []byte) []byte

func InDeferRecover

func InDeferRecover()

函数第一行

defer InDeferRecover()

主题代码

func LogRecoverError

func LogRecoverError(err any)

用法如下:

defer func() {
	if err := recover(); err != nil {
		util.LogRecoverError(err)
	}
}()

func PanicSafe added in v0.0.80

func PanicSafe(msg string, params ...any)

func Post added in v0.0.55

func Post(path, jsonBody string, header map[string]string) (string, bool, int)

func RandInt32

func RandInt32(max int32) int32

func RandInt64 added in v0.0.57

func RandInt64(max int64) int64

func SetMainSignal added in v0.0.80

func SetMainSignal(c chan os.Signal)

Types

This section is empty.

Jump to

Keyboard shortcuts

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