mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-17 08:42:02 +03:00
Implement new deprecated warnings
This commit is contained in:
@@ -2,6 +2,7 @@ package deprecated
|
||||
|
||||
import (
|
||||
"context"
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/sagernet/sing/service"
|
||||
)
|
||||
@@ -13,6 +14,7 @@ type Manager interface {
|
||||
func Report(ctx context.Context, feature Note) {
|
||||
manager := service.FromContext[Manager](ctx)
|
||||
if manager == nil {
|
||||
debug.PrintStack()
|
||||
return
|
||||
}
|
||||
manager.ReportDeprecated(feature)
|
||||
|
||||
Reference in New Issue
Block a user