move json config into a separate package

This commit is contained in:
Darien Raymond committed 2018-02-17 21:22:51 +01:00
1 parent 5bd3cee371
commit ab9ca3b842
5 files changed
+13 -3

No files matched your search

+3
View File
@@ -42,4 +42,7 @@ import (
_ "v2ray.com/core/transport/internet/headers/srtp" _ "v2ray.com/core/transport/internet/headers/srtp"
_ "v2ray.com/core/transport/internet/headers/utp" _ "v2ray.com/core/transport/internet/headers/utp"
_ "v2ray.com/core/transport/internet/headers/wechat" _ "v2ray.com/core/transport/internet/headers/wechat"
// JSON config format
_ "v2ray.com/core/main/json"
) )
@@ -1,4 +1,6 @@
package main package json
//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg json -path Main,Json
import ( import (
"context" "context"
@@ -1,6 +1,6 @@
// +build !windows // +build !windows
package main package json
import "syscall" import "syscall"
@@ -1,6 +1,6 @@
// +build windows // +build windows
package main package json
import "syscall" import "syscall"
+5
View File
@@ -0,0 +1,5 @@
package json
import "v2ray.com/core/common/errors"
func newError(values ...interface{}) *errors.Error { return errors.New(values...).Path("Main", "Json") }