1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 23:47:07 -05:00

generalize interface

This commit is contained in:
Shelikhoo 2018-04-04 18:17:42 +08:00
parent 7e96581921
commit 176a5c0d44
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -23,7 +23,7 @@ type Handler struct {
mux *mux.ClientManager mux *mux.ClientManager
} }
func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (*Handler, error) { func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (core.OutboundHandler, error) {
v := core.FromContext(ctx) v := core.FromContext(ctx)
if v == nil { if v == nil {
return nil, newError("V is not in context") return nil, newError("V is not in context")