Propertly initialize string slice for Tables() method

This commit is contained in:
Dan Sosedoff
2014-11-21 17:00:02 -06:00
parent c11eee546d
commit 5020ef10ea

View File

@@ -76,13 +76,13 @@ func (client *Client) Tables() ([]string, error) {
return nil, err return nil, err
} }
var tables []string results := make([]string, 0)
for _, row := range res.Rows { for _, row := range res.Rows {
tables = append(tables, row[0].(string)) results = append(results, row[0].(string))
} }
return tables, nil return results, nil
} }
func (client *Client) Table(table string) (*Result, error) { func (client *Client) Table(table string) (*Result, error) {