From c7d93f95af6fb36950bf99a8077e55452aaca3d7 Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Mon, 22 Jul 2019 14:32:06 +0200 Subject: [PATCH] Fixing syntax error left in previous pull request --- tableparser/tableparser.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tableparser/tableparser.go b/tableparser/tableparser.go index 9fba6b2..7f9622d 100644 --- a/tableparser/tableparser.go +++ b/tableparser/tableparser.go @@ -47,10 +47,10 @@ type Table struct { // Index holds the basic index information type Index struct { - Name string - Fields []string - Unique bool - Visible bool + Name string + Fields []string + Unique bool + Visible bool Expression string // MySQL 8.0.16+ } @@ -264,7 +264,7 @@ func getIndexes(db *sql.DB, schema, tableName string) (map[string]Index, error) for rows.Next() { var i IndexField - var table, string + var table string fields := []interface{}{&table, &i.NonUnique, &i.KeyName, &i.SeqInIndex, &i.ColumnName, &i.Collation, &i.Cardinality, &i.SubPart, &i.Packed, &i.Null, &i.IndexType, &i.Comment, &i.IndexComment, @@ -287,7 +287,7 @@ func getIndexes(db *sql.DB, schema, tableName string) (map[string]Index, error) Name: i.KeyName, Unique: !i.NonUnique, Fields: []string{i.ColumnName}, - Visible: i.Visible == "YES" || visible == "", + Visible: i.Visible == "YES" || i.Visible == "", Expression: i.Expression.String, }