-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
var cols []ColumnInfo
if meta.colCount < 1000 {
// preallocate columninfo to avoid excess copying
cols = make([]ColumnInfo, meta.colCount)
for i := 0; i < meta.colCount; i++ {
f.readCol(&cols[i], &meta, globalSpec, keyspace, table)
}
} else {
// use append, huge number of columns usually indicates a corrupt frame or
// just a huge row.
for i := 0; i < meta.colCount; i++ {
var col ColumnInfo
f.readCol(&col, &meta, globalSpec, keyspace, table)
cols = append(cols, col)
}
}
throws:
frame.go:1119:11: append to slice `cols` with non-zero initialized length (makezero)
cols = append(cols, col)
Metadata
Metadata
Assignees
Labels
No labels