Skip to content

Commit 1f54d98

Browse files
committed
code style
1 parent 36d88b9 commit 1f54d98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

schema/schema.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (ta *Table) FindColumn(name string) int {
183183
return -1
184184
}
185185

186-
// Get TableColumn by primary index index
186+
// Get TableColumn by column index of primary key.
187187
func (ta *Table) GetPKColumn(index int) *TableColumn {
188188
if index >= len(ta.PKColumns) {
189189
return nil
@@ -192,8 +192,8 @@ func (ta *Table) GetPKColumn(index int) *TableColumn {
192192
}
193193

194194
func (ta *Table) IsPrimaryKey(colIndex int) bool {
195-
for _, _colIndex := range ta.PKColumns {
196-
if _colIndex == colIndex {
195+
for _, i := range ta.PKColumns {
196+
if i == colIndex {
197197
return true
198198
}
199199
}

0 commit comments

Comments
 (0)