mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-28 21:15:46 -05:00
common.Must
This commit is contained in:
@@ -20,12 +20,6 @@ func RegisterInboundHandlerCreator(name string, creator InboundHandlerFactory) e
|
||||
return nil
|
||||
}
|
||||
|
||||
func MustRegisterInboundHandlerCreator(name string, creator InboundHandlerFactory) {
|
||||
if err := RegisterInboundHandlerCreator(name, creator); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func RegisterOutboundHandlerCreator(name string, creator OutboundHandlerFactory) error {
|
||||
if _, found := outboundFactories[name]; found {
|
||||
return common.ErrDuplicatedName
|
||||
@@ -34,12 +28,6 @@ func RegisterOutboundHandlerCreator(name string, creator OutboundHandlerFactory)
|
||||
return nil
|
||||
}
|
||||
|
||||
func MustRegisterOutboundHandlerCreator(name string, creator OutboundHandlerFactory) {
|
||||
if err := RegisterOutboundHandlerCreator(name, creator); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func CreateInboundHandler(name string, space app.Space, config interface{}, meta *InboundHandlerMeta) (InboundHandler, error) {
|
||||
creator, found := inboundFactories[name]
|
||||
if !found {
|
||||
|
||||
Reference in New Issue
Block a user