Skip to content

Commit

Permalink
Fixed issue with prefix removal in atomicstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
factom-clay committed Oct 18, 2019
1 parent bb94084 commit 34634bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util/atomic/atomic.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ func Goid() string {

func WhereAmIString(depth int) string {
_, fn, line, _ := runtime.Caller(depth + 1)
fn = fn[prefix:]
if len(fn) > prefix {
fn = fn[prefix:] // Chop off the /home/user/go/src...factomd/ part of the path.
}
return fmt.Sprintf("%v-%s:%d", Goid(), fn, line)
}

Expand Down

0 comments on commit 34634bc

Please sign in to comment.