func (a *Assist) RegisterComparer(i interface{}, comparer CompareFunc) {
	a.lock.Lock()
	defer a.lock.Unlock()
	a.assertInit()
	a.comparers[reflect.TypeOf(i)] = comparer
}
RegisterComparer registers a new value comparer for a type.
If a previous comparer already exists for the given type, it will be replaced.
package assistdog
import (
	"fmt"
	"reflect"
	"strings"
	"sync"
	"time"
	"github.com/cucumber/godog"
	"github.com/rdumont/assistdog/defaults"
)
var defaultParsers = map[interface{}]ParseFunc{
	"":          defaults.ParseString,
	0:           defaults.ParseInt,
	time.Time{}: defaults.ParseTime,
}
var defaultComparers = map[interface{}]CompareFunc{
	"":          defaults.CompareString,
	0:           defaults.CompareInt,
	time.Time{}: defaults.CompareTime,
}
type ParseFunc func(raw string) (interface{}, error)
type CompareFunc func(raw string, actual interface{}) error
func NewDefault() *Assist {
	a := new(Assist)
	for tp, p := range defaultParsers {
		a.RegisterParser(tp, p)
	}
	for tp, c := range defaultComparers {
		a.RegisterComparer(tp, c)
	}
	return a
}
type Assist struct {
	lock      sync.RWMutex
	parsers   map[reflect.Type]ParseFunc
	comparers map[reflect.Type]CompareFunc
}
func (a *Assist) RegisterParser(i interface{}, parser ParseFunc) {
	a.lock.Lock()
	defer a.lock.Unlock()
	a.assertInit()
	a.parsers[reflect.TypeOf(i)] = parser
}