ipld-eth-server/vendor/github.com/go-stack/stack/format_test.go
Matt K 293dd2e848 Add vendor dir (#16) (#4)
* Add vendor dir so builds dont require dep

* Pin specific version go-eth version
2018-01-29 13:44:18 -06:00

22 lines
340 B
Go

// +build go1.2
package stack_test
import (
"fmt"
"github.com/go-stack/stack"
)
func Example_callFormat() {
logCaller("%+s")
logCaller("%v %[1]n()")
// Output:
// github.com/go-stack/stack/format_test.go
// format_test.go:13 Example_callFormat()
}
func logCaller(format string) {
fmt.Printf(format+"\n", stack.Caller(1))
}