Add deprecated warnings

This commit is contained in:
世界 2024-10-18 09:58:03 +08:00
parent 8c143feec8
commit d66d5cd457
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
18 changed files with 307 additions and 52 deletions

View file

@ -153,14 +153,14 @@ func NewRouter(
Logger: router.dnsLogger,
})
for i, ruleOptions := range options.Rules {
routeRule, err := NewRule(router, router.logger, ruleOptions, true)
routeRule, err := NewRule(ctx, router, router.logger, ruleOptions, true)
if err != nil {
return nil, E.Cause(err, "parse rule[", i, "]")
}
router.rules = append(router.rules, routeRule)
}
for i, dnsRuleOptions := range dnsOptions.Rules {
dnsRule, err := NewDNSRule(router, router.logger, dnsRuleOptions, true)
dnsRule, err := NewDNSRule(ctx, router, router.logger, dnsRuleOptions, true)
if err != nil {
return nil, E.Cause(err, "parse dns rule[", i, "]")
}