Skip to content

🧹 chore: make boundary a const#3783

Merged
gaby merged 1 commit intogofiber:mainfrom
arturmelanchyk:boundary
Oct 5, 2025
Merged

🧹 chore: make boundary a const#3783
gaby merged 1 commit intogofiber:mainfrom
arturmelanchyk:boundary

Conversation

@arturmelanchyk
Copy link
Contributor

Description

Avoid boundary duplication

Changes introduced

List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide.

  • Benchmarks: Describe any performance benchmarks and improvements related to the changes.
  • Documentation Update: Detail the updates made to the documentation and links to the changed files.
  • Changelog/What's New: Include a summary of the additions for the upcoming release notes.
  • Migration Guide: If necessary, provide a guide or steps for users to migrate their existing code to accommodate these changes.
  • API Alignment with Express: Explain how the changes align with the Express API.
  • API Longevity: Discuss the steps taken to ensure that the new or updated APIs are consistent and not prone to breaking changes.
  • Examples: Provide examples demonstrating the new features or changes in action.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to existing features and functionality)
  • Documentation update (changes to documentation)
  • Performance improvement (non-breaking change which improves efficiency)
  • Code consistency (non-breaking change which improves code reliability and robustness)

Checklist

Before you submit your pull request, please make sure you meet these requirements:

  • Followed the inspiration of the Express.js framework for new functionalities, making them similar in usage.
  • Conducted a self-review of the code and provided comments for complex or critical parts.
  • Updated the documentation in the /docs/ directory for Fiber's documentation.
  • Added or updated unit tests to validate the effectiveness of the changes or new features.
  • Ensured that new and existing unit tests pass locally with the changes.
  • Verified that any new dependencies are essential and have been agreed upon by the maintainers/community.
  • Aimed for optimal performance with minimal allocations in the new code.
  • Provided benchmarks for the new code to analyze and improve upon.

Commit formatting

Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md

Signed-off-by: Artur Melanchyk <13834276+arturmelanchyk@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 5, 2025

Walkthrough

The multipart boundary handling was updated: a package-level boundary changed from variable to constant in client/core.go, and client/request.go now initializes the request pool using a runtime boundary value instead of a hard-coded string. No exported APIs or control flow were altered.

Changes

Cohort / File(s) Change summary
Multipart boundary declaration
client/core.go
Changed boundary from a package-level var to a const, enforcing immutability of "FiberFormBoundary".
Request pool boundary usage
client/request.go
Replaced hard-coded boundary string with a runtime boundary value during requestPool initialization; logic otherwise unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

codex

Suggested reviewers

  • sixcolors
  • efectn
  • ReneWerner87

Poem

I thump my paws at borders fine,
A boundary fixed—immutable line.
In pools I swim with strings anew,
No hard-coded crumbs to chew.
Hop, hop—requests now tidy and spry,
Carrots for constants! 🌿🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description only provides a brief purpose statement and leaves most template sections unfilled, missing a linked issue reference, detailed entries under Changes introduced, and updates for documentation, tests, benchmarks, and migration guidance. Please update the description to reference any related issue with “Fixes #”, populate the Changes introduced section with actual details of the var→const boundary modification, and complete or remove checklist items for benchmarks, documentation updates, changelog entries, unit tests, and migration guidance to align with the repository’s template.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title clearly summarizes the primary change of converting the boundary declaration to a constant, which matches the main intent of the pull request and remains concise and specific.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@arturmelanchyk arturmelanchyk marked this pull request as ready for review October 5, 2025 14:42
@arturmelanchyk arturmelanchyk requested a review from a team as a code owner October 5, 2025 14:42
@codecov
Copy link

codecov bot commented Oct 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.67%. Comparing base (a3c54bb) to head (c1f7afe).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3783   +/-   ##
=======================================
  Coverage   91.67%   91.67%           
=======================================
  Files         113      113           
  Lines       11959    11959           
=======================================
  Hits        10964    10964           
  Misses        731      731           
  Partials      264      264           
Flag Coverage Δ
unittests 91.67% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gaby gaby changed the title chore: make boundary a const 🧹 chore: make boundary a const Oct 5, 2025
@gaby gaby added this to v3 Oct 5, 2025
@gaby gaby added this to the v3 milestone Oct 5, 2025
@gaby gaby moved this to In Progress in v3 Oct 5, 2025
@gaby gaby added the hacktoberfest 🚀 Open for Hacktoberfest contributions! label Oct 5, 2025
@gaby gaby merged commit e8f639a into gofiber:main Oct 5, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in v3 Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest 🚀 Open for Hacktoberfest contributions! 🧹 Updates v3

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants