code: func (m *DbMap) TableFor(t reflect.Type, checkPK bool) (*TableMap, error) {
  	table := tableOrNil(m, t, "")
  	if table == nil {
  		return nil, fmt.Errorf("no table found for type: %v", t.Name())
  	}
  
  	if checkPK && len(table.keys) < 1 {
  		e := fmt.Sprintf("gorp: no keys defined for table: %s",
  			table.TableName)
  		return nil, errors.New(e)
  	}
  
  	return table, nil
  }
docs: // TableFor returns the *TableMap corresponding to the given Go Type
  // If no table is mapped to that type an error is returned.
  // If checkPK is true and the mapped table has no registered PKs, an error is returned.