mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-05 05:54:53 +00:00
feat: adapt new logging to workflow node processors
This commit is contained in:
@@ -24,10 +24,14 @@ type HookHandler struct {
|
||||
attrs []slog.Attr
|
||||
}
|
||||
|
||||
func NewHookHandler(options HookHandlerOptions) *HookHandler {
|
||||
func NewHookHandler(opts *HookHandlerOptions) *HookHandler {
|
||||
if opts == nil {
|
||||
opts = &HookHandlerOptions{}
|
||||
}
|
||||
|
||||
h := &HookHandler{
|
||||
mutex: &sync.Mutex{},
|
||||
options: &options,
|
||||
options: opts,
|
||||
}
|
||||
|
||||
if h.options.WriteFunc == nil {
|
||||
|
@@ -184,7 +184,7 @@ func GetValueOrDefaultAsBool(dict map[string]any, key string, defaultValue bool)
|
||||
}
|
||||
|
||||
// 将字典填充到指定类型的结构体。
|
||||
// 与 [json.Unmarshal] 类似,但传入的是一个 [map[string]interface{}] 对象而非 JSON 格式的字符串。
|
||||
// 与 [json.Unmarshal] 类似,但传入的是一个 [map[string]any] 对象而非 JSON 格式的字符串。
|
||||
//
|
||||
// 入参:
|
||||
// - dict: 字典。
|
||||
|
Reference in New Issue
Block a user