Add deprecated warnings

This commit is contained in:
世界
2024-10-18 09:58:03 +08:00
parent 8c143feec8
commit d66d5cd457
18 changed files with 307 additions and 52 deletions

View File

@@ -0,0 +1,19 @@
package deprecated
import (
"context"
"github.com/sagernet/sing/service"
)
type Manager interface {
ReportDeprecated(feature Note)
}
func Report(ctx context.Context, feature Note) {
manager := service.FromContext[Manager](ctx)
if manager == nil {
return
}
manager.ReportDeprecated(feature)
}