mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Errors: Add PrintRemovedFeatureError & PrintDeprecatedFeatureWarning (#3804)
This commit is contained in:
parent
3fed0c773f
commit
5f0642a671
8 changed files with 32 additions and 25 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"github.com/xtls/xray-core/common/errors"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/common/strmatcher"
|
||||
"github.com/xtls/xray-core/features"
|
||||
"github.com/xtls/xray-core/features/dns"
|
||||
)
|
||||
|
||||
|
@ -26,7 +25,7 @@ func NewStaticHosts(hosts []*Config_HostMapping, legacy map[string]*net.IPOrDoma
|
|||
}
|
||||
|
||||
if legacy != nil {
|
||||
features.PrintDeprecatedFeatureWarning("simple host mapping")
|
||||
errors.PrintDeprecatedFeatureWarning("simple host mapping", "")
|
||||
|
||||
for domain, ip := range legacy {
|
||||
matcher, err := strmatcher.Full.New(domain)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue