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) }