package
Version:
v0.0.0-...-af619fd
Opens a new window with list of versions in this module.
Published: Dec 7, 2022
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
SafeGo 进行安全的goroutine调用
第一个参数是context接口,如果还实现了Container接口,且绑定了日志服务,则使用日志服务
第二个参数是匿名函数handler, 进行最终的业务逻辑
SafeGo 函数并不会返回error,panic都会进入less的日志服务
SafeGoAndWait 进行并发安全并行调用
第一个参数是context接口,如果还实现了Container接口,且绑定了日志服务,则使用日志服务
第二个参数是匿名函数handlers数组, 进行最终的业务逻辑
返回handlers中任何一个错误(如果handlers中有业务逻辑返回错误)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.