func (c *CauseError) Cause() error {
	return c.cause
}
Return the causing error
package errors
import (
	"fmt"
	"runtime"
	"strings"
)
func New(text string) *ErrorString {
	return &ErrorString{text}
}
func Format(f string, val ...interface{}) error {
	return fmt.Errorf(f, val...)
}
type ErrorString struct {
	s string
}
func (e *ErrorString) Error() string {
	return e.s
}
type HereError struct {
	error
	pc  uintptr
	loc string
}
func Here(orig error) error {
	if orig == nil {
		return nil
	}
	if he, ok := orig.(*HereError); ok {
		return he
	}
	pc, file, line, ok := runtime.Caller(1)
	if ok {
		return &HereError{
			error: orig,
			pc:    pc,
			loc:   fmt.Sprintf("%s:%d", file, line),
		}
	}
	return &HereError{error: orig}
}
func (h *HereError) Error() string {
	return h.Location() + ": " + h.error.Error()
}
func (h *HereError) FullLocation() string {
	return h.loc
}
func (h *HereError) Location() string {
	lastSlash := strings.LastIndex(h.loc, "/")
	secondLastSlash := strings.LastIndex(h.loc[:lastSlash], "/")
	return h.loc[secondLastSlash+1:]
}
type CauseError struct {
	error
	cause error
}
func Cause(err error, cause error) error {
	if err == nil {
		return nil
	}
	return &CauseError{
		error: err,
		cause: cause,
	}
}