miscs

package
v1.1.46 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DateLayout = "2006-01-02"
View Source
const DateTimeLayout = "2006-01-02 15:04:05"
View Source
const TimeLayout = "15:04:05"

Variables

DefSysSigs 默认监听的系统信号

Functions

func CatchRecover added in v1.1.15

func CatchRecover(fs ...func(interface{}))

CatchRecover 捕获异常处理

func CatchSysSig added in v1.1.41

func CatchSysSig(f func(os.Signal), signs ...os.Signal)

CatchSysSig 捕获系统信号 捕获后处理

func CatchSysSigExit added in v1.1.46

func CatchSysSigExit(f func(os.Signal), signs ...os.Signal)

func ErrPanic added in v1.1.46

func ErrPanic(err error)

Types

type AdvancedContext added in v1.1.46

type AdvancedContext struct {
	context.Context
	Wait sync.WaitGroup
	// contains filtered or unexported fields
}

AdvancedContext 自定义Context

func NewCancelAdvancedContext added in v1.1.46

func NewCancelAdvancedContext(parent context.Context) *AdvancedContext

func (*AdvancedContext) Cancel added in v1.1.46

func (c *AdvancedContext) Cancel(err error)

Jump to

Keyboard shortcuts

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