chore: remove unused patches

This commit is contained in:
mzz2017 2023-03-14 18:29:57 +08:00
parent 86547c6522
commit f44938648c

View File

@ -6,7 +6,6 @@
package config
import (
"fmt"
"github.com/daeuniverse/dae/common/consts"
)
@ -14,8 +13,6 @@ type patch func(params *Config) error
var patches = []patch{
patchEmptyDns,
patchDeprecatedGlobalDnsUpstream,
patchDeprecatedLanNatDirect,
}
func patchEmptyDns(params *Config) error {
@ -27,18 +24,3 @@ func patchEmptyDns(params *Config) error {
}
return nil
}
func patchDeprecatedGlobalDnsUpstream(params *Config) error {
if params.Global.DnsUpstream != "<empty>" {
return fmt.Errorf("'global.dns_upstream' was deprecated, please refer to the latest examples and docs for help")
}
params.Global.DnsUpstream = ""
return nil
}
func patchDeprecatedLanNatDirect(params *Config) error {
if params.Global.LanNatDirect != false {
return fmt.Errorf("'global.lan_nat_direct' was deprecated; please remove it")
}
return nil
}