Skip to content

refactor: modernize & cleanup context.go code#760

Merged
buchdag merged 2 commits into
mainfrom
refactor/context
Jul 11, 2026
Merged

refactor: modernize & cleanup context.go code#760
buchdag merged 2 commits into
mainfrom
refactor/context

Conversation

@buchdag

@buchdag buchdag commented Jul 11, 2026

Copy link
Copy Markdown
Member

Small perf improvement and code cleanup / refactor on internal/context/context.go.

@buchdag buchdag self-assigned this Jul 11, 2026
@buchdag buchdag force-pushed the refactor/context branch from 1e88395 to 093c62f Compare July 11, 2026 21:38
- factor out file io and scanning logic into an helper
- avoiding using defer in a loop
- remove redundant scanner.Split() and bufio.ScanLines() calls
- increase scanner buffer size to handle long /proc/mountinfo lines
- explicitly handle scanner.Err()
@buchdag buchdag force-pushed the refactor/context branch from 093c62f to 2cbe9af Compare July 11, 2026 21:39
@buchdag buchdag merged commit ea3bb98 into main Jul 11, 2026
9 checks passed
@buchdag buchdag deleted the refactor/context branch July 11, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant