RPRX 2021-03-08 18:12:38 +00:00 committed by GitHub
parent d7cd71b741
commit 3de5af0611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -40,10 +40,8 @@ func (err *Error) pkgPath() string {
return "" return ""
} }
path := reflect.TypeOf(err.pathObj).PkgPath() path := reflect.TypeOf(err.pathObj).PkgPath()
for i := 0; i < len(path); i++ { if len(path) >= trim {
if path[i] == '/' { return path[trim:]
return path[trim:]
}
} }
return path return path
} }