func (err *ErrInsertFailed) Error() string {
	return fmt.Sprintf("insert failed: %v", err.Err)
}
Error satisfies the error interface.
package models
import (
	"context"
	"database/sql"
	"database/sql/driver"
	"encoding/csv"
	"fmt"
	"io"
	"regexp"
	"strings"
)
var (
	logf = func(string, ...interface{}) {}
	errf = func(string, ...interface{}) {}
)
func logerror(err error) error {
	errf("ERROR: %v", err)
	return err
}
func Logf(s string, v ...interface{}) {
	logf(s, v...)
}
func SetLogger(logger interface{}) {
	logf = convLogger(logger)
}
func Errorf(s string, v ...interface{}) {
	errf(s, v...)
}
func SetErrorLogger(logger interface{}) {
	errf = convLogger(logger)
}
func convLogger(logger interface{}) func(string, ...interface{}) {
	switch z := logger.(type) {
	case io.Writer:
		return func(s string, v ...interface{}) {
			fmt.Fprintf(z, s, v...)
		}
	case func(string, ...interface{}) (int, error):  
		return func(s string, v ...interface{}) {
			_, _ = z(s, v...)
		}
	case func(string, ...interface{}):  
		return z
	}
	panic(fmt.Sprintf("unsupported logger type %T", logger))
}
type DB interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}
type Error string
func (err Error) Error() string {
	return string(err)
}
const (
	ErrAlreadyExists Error = "already exists"
	ErrDoesNotExist Error = "does not exist"
	ErrMarkedForDeletion Error = "marked for deletion"
)
type ErrInsertFailed struct {
	Err error
}