Skip to content

Refactor icon lookup into table-driven mappings #65

@OussamaM1

Description

@OussamaM1

service/util.go currently resolves file and folder icons through a long sequence of
switch cases in printWithIconAndPrefix and printIconFiles. This works, but it is
hard to maintain, easy to duplicate incorrectly, and requires editing control flow
whenever a new extension or special filename is added.

Refactor icon resolution into table-driven mappings keyed by normalized extension,
exact filename, and special folder name.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions