func (c *ContextError) Error() string {
	return c.context + ": " + c.error.Error()
}
Return a string containing the context as well as the underlying 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,
	}
}
func (c *CauseError) Cause() error {
	return c.cause
}
type TraceError struct {
	error
	trace string
}
func Trace(err error) error {
	if err == nil {
		return nil
	}
	buf := make([]byte, 1024)
	sz := runtime.Stack(buf, false)
	return &TraceError{
		error: err,
		trace: string(buf[:sz]),
	}
}
func (t *TraceError) Trace() string {
	return t.trace
}
type ContextError struct {
	error
	context string
}
func Context(err error, ctx string) error {
	if err == nil {
		return nil
	}
	return &ContextError{
		error:   err,
		context: ctx,
	}
}
func (c *ContextError) Context() string {
	return c.context
}