Files
open-im-server-deploy/pkg/common/webhook/condition.go
kim.dev.6789 e50142a3b9 复制项目
2026-01-14 22:16:44 +08:00

15 lines
283 B
Go

package webhook
import (
"context"
"git.imall.cloud/openim/open-im-server-deploy/pkg/common/config"
)
func WithCondition(ctx context.Context, before *config.BeforeConfig, callback func(context.Context) error) error {
if !before.Enable {
return nil
}
return callback(ctx)
}