You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// +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)) }
|