func New(ctx context.Context, driverName, dataSourceName string) (*Client, error) {
	driversMu.RLock()
	driveri, ok := drivers[driverName]
	driversMu.RUnlock()
	if !ok {
		return nil, fmt.Errorf("kivik: unknown driver %q (forgotten import?)", driverName)
	}
	client, err := driveri.NewClient(ctx, dataSourceName)
	if err != nil {
		return nil, err
	}
	return &Client{
		dsn:          dataSourceName,
		driverName:   driverName,
		driverClient: client,
	}, nil
}
// New creates a new client object specified by its database driver name
// and a driver-specific data source name.
New creates a new client object specified by its database driver name
and a driver-specific data source name.
// New creates a new client object specified by its database driver name // and a driver - specific data source name .
func New(ctx context.Context, driverName, dataSourceName string) (*Client, error) {
	driversMu.RLock()
	driveri, ok := drivers[driverName]
	driversMu.RUnlock()
	if !ok {
		return nil, fmt.Errorf("kivik: unknown driver %q (forgotten import?)", driverName)
	}
	client, err := driveri.NewClient(ctx, dataSourceName)
	if err != nil {
		return nil, err
	}
	return &Client{
		dsn:          dataSourceName,
		driverName:   driverName,
		driverClient: client,
	}, nil
}
func New ( ctx context . Context , driverName , dataSourceName string ) ( * Client , error ) { driversMu . RLock ( ) driveri , ok := drivers [ driverName ] driversMu . RUnlock ( ) if ! ok { return nil , fmt . Errorf ( " " , driverName ) } client , err := driveri . NewClient ( ctx , dataSourceName ) if err != nil { return nil , err } return & Client { dsn : dataSourceName , driverName : driverName , driverClient : client , } , nil }
New creates a new client object specified by its database driver name
and a driver-specific data source name.
New creates a new client object specified by its database driver name and a driver - specific data source name .