func WithForceDefault() Option {
	return func(mr *MultiResolver) {
		mr.ForceDefault = true
	}
}
WithForceDefault will force resolution using the default resolver chain.
package multiresolver
import (
	"errors"
	"fmt"
	"io/ioutil"
	"path"
	"strings"
	"github.com/ethsana/sana/pkg/logging"
	"github.com/ethsana/sana/pkg/resolver"
	"github.com/ethsana/sana/pkg/resolver/client/ens"
	"github.com/ethsana/sana/pkg/resolver/multiresolver/multierror"
)
var _ resolver.Interface = (*MultiResolver)(nil)
var (
	ErrTLDTooLong = fmt.Errorf("TLD exceeds maximum length of %d characters", maxTLDLength)
	ErrInvalidTLD = errors.New("invalid TLD")
	ErrResolverChainEmpty = errors.New("resolver chain empty")
	ErrResolverChainFailed = errors.New("resolver chain failed")
	ErrCloseFailed = errors.New("close failed")
)
type resolverMap map[string][]resolver.Interface
type MultiResolver struct {
	resolvers resolverMap
	logger    logging.Logger
	cfgs      []ConnectionConfig
	ForceDefault bool
}
type Option func(*MultiResolver)
func NewMultiResolver(opts ...Option) *MultiResolver {
	mr := &MultiResolver{
		resolvers: make(resolverMap),
	}
	for _, o := range opts {
		o(mr)
	}
	if mr.logger == nil {
		mr.logger = logging.New(ioutil.Discard, 0)
	}
	log := mr.logger
	if len(mr.cfgs) == 0 {
		log.Info("name resolver: no name resolution service provided")
		return mr
	}
	for _, c := range mr.cfgs {
		mr.connectENSClient(c.TLD, c.Address, c.Endpoint)
	}
	return mr
}
func WithConnectionConfigs(cfgs []ConnectionConfig) Option {
	return func(mr *MultiResolver) {
		mr.cfgs = cfgs
	}
}
func WithLogger(logger logging.Logger) Option {
	return func(mr *MultiResolver) {
		mr.logger = logger
	}
}