func (err *Err) WithField(name, value string) *Err {
	if err.Fields == nil {
		err.Fields = make(Fields)
	}
	err.Fields[name] = value
	return err
}
WithField -- adds field to Err, chainable
package cherry
import (
	"bytes"
	"fmt"
	"net/http"
	"runtime"
	"strconv"
	"strings"
)
type ErrSID string
type ErrKind uint64
type ErrID struct {
	SID  ErrSID  `json:"sid"`
	Kind ErrKind `json:"kind"`
}
func (errID *ErrID) String() string {
	return fmt.Sprintf("%v-%v", errID.SID, errID.Kind)
}
type Fields map[string]string
type Err struct {
	Message    string   `json:"message"`
	StatusHTTP int      `json:"status_http"`
	ID         ErrID    `json:"id"`
	Details    []string `json:"details,omitempty"`
	Fields     Fields   `json:"fields,omitempty"`
}
func NewErr(msg string, status int, ID ErrID) *Err {
	return &Err{
		Message:    msg,
		StatusHTTP: status,
		ID:         ID,
	}
}
func (err *Err) Emit() *Err {
	if err == nil {
		_, file, line, _ := runtime.Caller(1)
		err = NewErr("undefined error", 0, ErrID{}).
			WithField("file", file).
			WithField("line", strconv.Itoa(line))
	}
	return err
}
func (err *Err) EmitDefault(defaulterr Err) *Err {
	if err == nil {
		return &defaulterr
	}
	return err
}
func BuildErr(SID ErrSID) func(string, int, ErrKind) *Err {
	return func(msg string, status int, kind ErrKind) *Err {
		return NewErr(msg, status, ErrID{SID: SID, Kind: kind})
	}
}
func (err *Err) Error() string {
	buf := bytes.NewBufferString("[" + err.ID.String() + "] " +
		http.StatusText(err.StatusHTTP) + " " +
		err.Message)
	if len(err.Details) > 0 {
		buf.WriteString(": ")
		buf.WriteString(strings.Join(err.Details, "; "))
	}
	if len(err.Fields) > 0 {
		buf.WriteString(": ")
		var fields []string
		for name, value := range err.Fields {
			fields = append(fields, name+"="+strconv.QuoteToASCII(value))
		}
		buf.WriteString(strings.Join(fields, ", "))
	}
	return buf.String()
}
func (err *Err) AddDetails(details ...string) *Err {
	err.Details = append(err.Details, details...)
	return err
}
func (err *Err) AddDetailF(formatS string, args ...interface{}) *Err {
	return err.AddDetails(fmt.Sprintf(formatS, args...))
}
func (err *Err) AddDetailsErr(details ...error) *Err {
	for _, detail := range details {
		err.AddDetails(detail.Error())
	}
	return err
}