mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-31 00:14:21 +03:00
Improve config struct
This commit is contained in:
@@ -13,9 +13,6 @@ import (
|
||||
)
|
||||
|
||||
func NewRule(router adapter.Router, logger log.ContextLogger, options option.Rule) (adapter.Rule, error) {
|
||||
if common.IsEmptyByEquals(options) {
|
||||
return nil, E.New("empty rule config")
|
||||
}
|
||||
switch options.Type {
|
||||
case "", C.RuleTypeDefault:
|
||||
if !options.DefaultOptions.IsValid() {
|
||||
|
||||
@@ -13,9 +13,6 @@ import (
|
||||
)
|
||||
|
||||
func NewDNSRule(router adapter.Router, logger log.ContextLogger, options option.DNSRule) (adapter.DNSRule, error) {
|
||||
if common.IsEmptyByEquals(options) {
|
||||
return nil, E.New("empty rule config")
|
||||
}
|
||||
switch options.Type {
|
||||
case "", C.RuleTypeDefault:
|
||||
if !options.DefaultOptions.IsValid() {
|
||||
|
||||
Reference in New Issue
Block a user