utils

package
v0.0.0-...-52204ac Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheTime

func CacheTime() string

CacheTime returns a time cache in seconds. we use a cache to reduce the format

func GoWithRecover

func GoWithRecover(handler func(), recoverHandler func(r interface{}))

GoWithRecover wraps a `go func()` with recover()

func RegisterRecoverLogger

func RegisterRecoverLogger(f func(w io.Writer, r interface{}))

RegisterRecoverLogger replace the log handler when go with recover catch a panic notice the replaced handler should be simple. if the handler panic, the recover handler will be failed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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