mirror of
https://github.com/pkg/errors.git
synced 2025-05-31 11:42:45 +00:00
fix loc.Location, re-enable tip
This commit is contained in:
parent
346b85b84a
commit
ab94cc2ab2
@ -4,6 +4,7 @@ go:
|
|||||||
- 1.4.3
|
- 1.4.3
|
||||||
- 1.5.4
|
- 1.5.4
|
||||||
- 1.6.1
|
- 1.6.1
|
||||||
|
- tip
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go test -v ./...
|
- go test -v ./...
|
||||||
|
@ -59,7 +59,7 @@ import (
|
|||||||
type loc uintptr
|
type loc uintptr
|
||||||
|
|
||||||
func (l loc) Location() (string, int) {
|
func (l loc) Location() (string, int) {
|
||||||
pc := uintptr(l)
|
pc := uintptr(l) - 1
|
||||||
fn := runtime.FuncForPC(pc)
|
fn := runtime.FuncForPC(pc)
|
||||||
if fn == nil {
|
if fn == nil {
|
||||||
return "unknown", 0
|
return "unknown", 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user