1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-25 19:45:38 -05:00

prefer interface over struct

This commit is contained in:
V2Ray
2015-09-20 18:22:29 +02:00
parent 823cbf1509
commit cb16047cf0
12 changed files with 88 additions and 59 deletions

View File

@@ -10,7 +10,7 @@ import (
type OutboundConnectionHandler struct {
Data2Send *bytes.Buffer
Data2Return []byte
Destination *v2net.Destination
Destination v2net.Destination
}
func (handler *OutboundConnectionHandler) Start(ray core.OutboundRay) error {
@@ -32,7 +32,7 @@ func (handler *OutboundConnectionHandler) Start(ray core.OutboundRay) error {
return nil
}
func (handler *OutboundConnectionHandler) Create(point *core.Point, config []byte, dest *v2net.Destination) (core.OutboundConnectionHandler, error) {
func (handler *OutboundConnectionHandler) Create(point *core.Point, config []byte, dest v2net.Destination) (core.OutboundConnectionHandler, error) {
handler.Destination = dest
return handler, nil
}