Errors: Add PrintRemovedFeatureError & PrintDeprecatedFeatureWarning (#3804)

This commit is contained in:
Kobe Arthur Scofield 2024-09-15 12:55:54 +08:00 committed by GitHub
parent 3fed0c773f
commit 5f0642a671
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 32 additions and 25 deletions

View file

@ -593,7 +593,7 @@ func (c *Config) Build() (*core.Config, error) {
}
if len(c.Transport) > 0 {
return nil, errors.New("Global transport config is deprecated")
return nil, errors.PrintRemovedFeatureError("Global transport config", "streamSettings in inbounds and outbounds")
}
for _, rawInboundConfig := range inbounds {