Skip to content

refactor: use strings.builder#2036

Merged
chasefleming merged 1 commit into
onflow:masterfrom
keeghcet:master
Sep 8, 2025
Merged

refactor: use strings.builder#2036
chasefleming merged 1 commit into
onflow:masterfrom
keeghcet:master

Conversation

@keeghcet
Copy link
Copy Markdown
Contributor

@keeghcet keeghcet commented Sep 8, 2025

Closes #???

Description

The modernize has added an analyzer for using strings.Builder for string construction. strings.Builder has fewer memory allocations and better performance.

More info: golang/go#75190


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Signed-off-by: keeghcet <keeghcet@outlook.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors string concatenation in the Oneliner() method to use strings.Builder instead of simple string concatenation for better performance and reduced memory allocations.

  • Replaces string concatenation with strings.Builder for improved performance
  • Updates all string append operations to use WriteString() method
  • Adds necessary import for the strings package

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chasefleming chasefleming added the Improvement Technical work without new features, refactoring, improving tests label Sep 8, 2025
@chasefleming
Copy link
Copy Markdown
Member

Thanks for improving this!

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/events/events.go 0.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@chasefleming chasefleming merged commit 0c5eafb into onflow:master Sep 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement Technical work without new features, refactoring, improving tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants