1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 15:36:41 -05:00

refine package prefix cleanup

This commit is contained in:
kslr 2021-04-02 22:04:53 +08:00
parent b50d692128
commit 01380177b8

View File

@ -38,9 +38,8 @@ func (err *Error) pkgPath() string {
return "" return ""
} }
path := reflect.TypeOf(err.pathObj).PkgPath() path := reflect.TypeOf(err.pathObj).PkgPath()
if strings.HasPrefix(path, "github.com/v2fly/v2ray-core/v4/") { path = strings.TrimPrefix(path, "github.com/v2fly/v2ray-core/v4")
return path[31:] path = strings.TrimPrefix(path, "github.com/v2fly/v2ray-core/v4/")
}
return path return path
} }