Since you have started writing Go, you are probably familiar with stack traces.

panic: panic from library goroutine 1 [running]:

github.com/aerokite/build/pkg/lib.Panic()

/Users/mir/go/src/github.com/aerokite/build/pkg/lib/lib.go:5 +0x39

github.com/aerokite/build/pkg.Middle()

/Users/mir/go/src/github.com/aerokite/build/pkg/pkg.go:7 +0x20

main.main()

/Users/mir/go/src/github.com/aerokite/build/main.go:6 +0x20

Stack trace provides, most of the cases, enough information to identify where the panic (in this example) occurs. It shows the chain of function calls and the source file with line number at which the function was called.

/Users/mir/go/src/github.com/aerokite/build/pkg/lib/lib.go:5 +0x39

/Users/mir/go/src/github.com/aerokite/build/pkg/pkg.go:7 +0x20

/Users/mir/go/src/github.com/aerokite/build/main.go:6 +0x20