Skip to content

Consolidate Duplicate Filtering Logic #3

@arya2004

Description

@arya2004

Both filter.go and model/packet.go have similar or identical ciMatch and filtering logic (Apply, ApplyFilters). This is redundant and makes maintenance harder.

Task:

  • Move all filtering logic to the model package (model/packet.go).
  • Remove redundant code from filter.go and delete the file.
  • Update any imports/usages of the filtering logic in other files (e.g., client.go).

Tip:
Replace usages like filter.ApplyFilters(...) with model.ApplyFilters(...) and adjust arguments if needed.

Why:
This makes the codebase easier to maintain and reduces bugs due to logic duplication.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions