Skip to content

Commit

Permalink
chore: remove unused patches
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 committed Mar 14, 2023
1 parent 86547c6 commit f449386
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions config/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
package config

import (
"fmt"
"github.com/daeuniverse/dae/common/consts"
)

type patch func(params *Config) error

var patches = []patch{
patchEmptyDns,
patchDeprecatedGlobalDnsUpstream,
patchDeprecatedLanNatDirect,
}

func patchEmptyDns(params *Config) error {
Expand All @@ -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
}

0 comments on commit f449386

Please sign in to comment.