Skip to content

fix: avoid []byte copy in extractKeyValue - #43

Merged
joaooncode merged 1 commit into
joaooncode:mainfrom
team-humaki:fix/39-extractkeyvalue-indexbyte
Sep 12, 2026
Merged

joaooncode merged 1 commit into
joaooncode:mainfrom
team-humaki:fix/39-extractkeyvalue-indexbyte

Conversation

@team-humaki

Copy link
Copy Markdown
Contributor

Fixes #39.

extractKeyValue was converting the whole line to []byte only to call bytes.IndexByte. strings.IndexByte finds the same index without the allocation.

Avoid copying the line to []byte just to find '='.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: extractKeyValue faz uma conversão para []byte desnecessária para encontrar '='

2 participants