getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 147 forks source link

Fixed a bug when stacktrace builds from an anonymous function #201

Closed marvell closed 6 years ago

marvell commented 6 years ago

This code fixes a bug when a stacktrace builds from anonymous function. For example,

package main

func main() {
    func(){
        raven.NewStacktrace(0, 3, nil)
    }()
}

pack will be main.main and func will be func1, but should main and main.func1.

marvell commented 6 years ago

Guys, please, merge this MR.

marvell commented 6 years ago

@mitsuhiko please, take a look on it.

mitsuhiko commented 6 years ago

lgtk. Thanks!