sing-box/experimental/deprecated/manager.go
2024-11-07 16:43:08 +08:00

22 lines
343 B
Go

package deprecated
import (
"context"
"runtime/debug"
"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 {
debug.PrintStack()
return
}
manager.ReportDeprecated(feature)
}