func (g *Gocial) Driver(driver string) *Gocial {
	g.driver = driver
	g.scopes = defaultScopesMap[driver]
	if g.state == "" {
		g.state = randToken()
	}
	return g
}
Driver is needed to choose the correct social
package gocialite
import (
	"crypto/rand"
	"encoding/base64"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"strings"
	"sync"
	"github.com/danilopolani/gocialite/drivers"
	"github.com/danilopolani/gocialite/structs"
	"golang.org/x/oauth2"
	"gopkg.in/oleiade/reflections.v1"
)
type Dispatcher struct {
	mu sync.RWMutex
	g  map[string]*Gocial
}
func NewDispatcher() *Dispatcher {
	return &Dispatcher{g: make(map[string]*Gocial)}
}
func (d *Dispatcher) New() *Gocial {
	d.mu.Lock()
	defer d.mu.Unlock()
	state := randToken()
	g := &Gocial{state: state}
	d.g[state] = g
	return g
}
func (d *Dispatcher) Handle(state, code string) (*structs.User, *oauth2.Token, error) {
	d.mu.RLock()
	g, ok := d.g[state]
	d.mu.RUnlock()
	if !ok {
		return nil, nil, fmt.Errorf("invalid CSRF token: %s", state)
	}
	err := g.Handle(state, code)
	d.mu.Lock()
	delete(d.g, state)
	d.mu.Unlock()
	return &g.User, g.Token, err
}
type Gocial struct {
	driver, state string
	scopes        []string
	conf          *oauth2.Config
	User          structs.User
	Token         *oauth2.Token
}
func init() {
	drivers.InitializeDrivers(RegisterNewDriver)
}
var (
	apiMap = map[string]map[string]string{}
	userMap = map[string]map[string]string{}
	endpointMap = map[string]oauth2.Endpoint{}
	callbackMap = map[string]func(client *http.Client, u *structs.User){}
	defaultScopesMap = map[string][]string{}
)
func RegisterNewDriver(driver string, defaultscopes []string, callback func(client *http.Client, u *structs.User), endpoint oauth2.Endpoint, apimap, usermap map[string]string) {
	apiMap[driver] = apimap
	userMap[driver] = usermap
	endpointMap[driver] = endpoint
	callbackMap[driver] = callback
	defaultScopesMap[driver] = defaultscopes
}