func HasStack(err error) bool {
	if errWithStack, ok := err.(StackTraceAware); ok {
		return errWithStack.HasStack()
	}
	return GetStackTracer(err) != nil
}
HasStack tells whether a StackTracer exists in the error chain
package errors
import (
	"fmt"
	"io"
)
func New(message string) error {
	return &fundamental{
		msg:   message,
		stack: callers(),
	}
}
func Errorf(format string, args ...interface{}) error {
	return &fundamental{
		msg:   fmt.Sprintf(format, args...),
		stack: callers(),
	}
}
type StackTraceAware interface {
	HasStack() bool
}