log/log.go
func StackWithCaller(err interface{}) {
	stack := make([]byte, 64<<10)
	stack = stack[:runtime.Stack(stack, false)]

	if pack, ok := callerPackage(); ok {
		log.Printf("%s: %v\n%s", pack, err, stack)
	} else {
		log.Printf("%v\n%s", err, stack)
	}
}
func StackWithCaller(err interface{}) {
	stack := make([]byte, 64<<10)
	stack = stack[:runtime.Stack(stack, false)]

	if pack, ok := callerPackage(); ok {
		log.Printf("%s: %v\n%s", pack, err, stack)
	} else {
		log.Printf("%v\n%s", err, stack)
	}
}
// StackWithCaller logs the error err with the caller package name and the stack trace.