1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-26 20:15:26 -05:00

simplify error creation

This commit is contained in:
Darien Raymond
2018-09-30 18:39:53 +02:00
parent 00ea6e3cb2
commit d55fbd7f8d
48 changed files with 208 additions and 87 deletions

View File

@@ -2,6 +2,8 @@ package encoding
import "v2ray.com/core/common/errors"
type errPathObjHolder struct{}
func newError(values ...interface{}) *errors.Error {
return errors.New(values...).Path("Proxy", "VMess", "Encoding")
return errors.New(values...).WithPathObj(errPathObjHolder{})
}