func (l *UserLoader) Load(key string) (*User, error) {
	return l.LoadThunk(key)()
}
Load a User by key, batching and caching will be applied automatically
package example
import (
	"sync"
	"time"
)
type UserLoaderConfig struct {
	Fetch func(keys []string) ([]*User, []error)
	Wait time.Duration
	MaxBatch int
}
func NewUserLoader(config UserLoaderConfig) *UserLoader {
	return &UserLoader{
		fetch:    config.Fetch,
		wait:     config.Wait,
		maxBatch: config.MaxBatch,
	}
}
type UserLoader struct {
	fetch func(keys []string) ([]*User, []error)
	wait time.Duration
	maxBatch int
	cache map[string]*User
	batch *userLoaderBatch
	mu sync.Mutex
}
type userLoaderBatch struct {
	keys    []string
	data    []*User
	error   []error
	closing bool
	done    chan struct{}
}