GetDataCell returns a DataCell from the pool with the given fields.
(ruleName string, data map[string]interface{}, url string, parentURL string, downloadTime string)
| 35 | |
| 36 | // GetDataCell returns a DataCell from the pool with the given fields. |
| 37 | func GetDataCell(ruleName string, data map[string]interface{}, url string, parentURL string, downloadTime string) DataCell { |
| 38 | cell := dataCellPool.Get().(DataCell) |
| 39 | cell[FieldRuleName] = ruleName |
| 40 | cell["Data"] = data |
| 41 | cell[FieldURL] = url |
| 42 | cell[FieldParentURL] = parentURL |
| 43 | cell[FieldDownloadTime] = downloadTime |
| 44 | return cell |
| 45 | } |
| 46 | |
| 47 | // GetFileCell returns a FileCell from the pool with the given fields. |
| 48 | func GetFileCell(ruleName, name string, bytes []byte) FileCell { |