fix lint warnings

This commit is contained in:
Darien Raymond
2018-05-31 11:55:11 +02:00
parent fe3ddb0ef5
commit adade2bffd
19 changed files with 159 additions and 80 deletions

16
functions.go Normal file
View File

@@ -0,0 +1,16 @@
package core
import (
"context"
"v2ray.com/core/common"
)
// CreateObject creates a new object based on the given V2Ray instance and config. The V2Ray instance may be nil.
func CreateObject(v *Instance, config interface{}) (interface{}, error) {
ctx := context.Background()
if v != nil {
ctx = context.WithValue(ctx, v2rayKey, v)
}
return common.CreateObject(ctx, config)
}