mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +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
|
@ -15,7 +15,6 @@ import (
|
|||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/common/session"
|
||||
"github.com/xtls/xray-core/common/strmatcher"
|
||||
"github.com/xtls/xray-core/features"
|
||||
"github.com/xtls/xray-core/features/dns"
|
||||
)
|
||||
|
||||
|
@ -96,7 +95,7 @@ func New(ctx context.Context, config *Config) (*DNS, error) {
|
|||
geoipContainer := router.GeoIPMatcherContainer{}
|
||||
|
||||
for _, endpoint := range config.NameServers {
|
||||
features.PrintDeprecatedFeatureWarning("simple DNS server")
|
||||
errors.PrintDeprecatedFeatureWarning("simple DNS server", "")
|
||||
client, err := NewSimpleClient(ctx, endpoint, clientIP)
|
||||
if err != nil {
|
||||
return nil, errors.New("failed to create client").Base(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue