sing-box/experimental/deprecated/manager.go

20 lines
305 B
Go
Raw Normal View History

2024-10-18 09:58:03 +08:00
package deprecated
import (
"context"
2024-11-07 21:44:04 +08:00
2024-10-18 09:58:03 +08:00
"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)
}