code: func NewConnection(deets *ConnectionDetails) (*Connection, error) {
  	err := deets.Finalize()
  	if err != nil {
  		return nil, errors.WithStack(err)
  	}
  	c := &Connection{
  		ID: randx.String(30),
  	}
  
  	if nc, ok := newConnection[deets.Dialect]; ok {
  		c.Dialect, err = nc(deets)
  		if err != nil {
  			return c, errors.Wrap(err, "could not create new connection")
  		}
  		return c, nil
  	}
  	return nil, errors.Errorf("could not found connection creator for %v", deets.Dialect)
  }
docs: // NewConnection creates a new connection, and sets it's `Dialect`
  // appropriately based on the `ConnectionDetails` passed into it.