Skip to content

📒 docs: improve deprecated comments#187

Merged
ReneWerner87 merged 1 commit into
gofiber:masterfrom
alexandear-org:docs/improve-deprecated
May 25, 2026
Merged

📒 docs: improve deprecated comments#187
ReneWerner87 merged 1 commit into
gofiber:masterfrom
alexandear-org:docs/improve-deprecated

Conversation

@alexandear

@alexandear alexandear commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

This PR improves deprecated functions:

Before:

image

After:

image

Summary by CodeRabbit

  • Refactor
    • Updated deprecation notices for ToLowerBytes, ToUpperBytes, ToLower, and ToUpper functions with direct references to their replacements in the new utility package location. Users should migrate to the updated function paths for continued support.

@alexandear alexandear requested a review from a team as a code owner March 13, 2026 12:08
@alexandear alexandear requested review from ReneWerner87, efectn, gaby and sixcolors and removed request for a team March 13, 2026 12:08
@ReneWerner87 ReneWerner87 added the 📒 Documentation Improvements or additions to documentation label Mar 13, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the developer experience when dealing with deprecated utility functions. It updates the deprecation notices to provide clickable links to the recommended replacement functions in godoc, making it easier for users to navigate to the correct alternatives. Additionally, it introduces go:fix inline directives, enabling automated code migration for these deprecated functions, streamlining the update process for users.

Highlights

  • Improved Deprecation Comments: Deprecation comments for ToLowerBytes, ToUpperBytes, ToLower, and ToUpper functions were updated to use the new Go documentation link format, making them clickable in godoc.
  • Enabled go fix -inline Migration: The go:fix inline directive was added to the deprecated functions, allowing users to automatically migrate their code using go fix -inline.
Changelog
  • bytes.go
    • Updated ToLowerBytes deprecation comment to use [github.com/gofiber/utils/v2/bytes.UnsafeToLower] and added //go:fix inline.
    • Updated ToUpperBytes deprecation comment to use [github.com/gofiber/utils/v2/bytes.UnsafeToUpper] and added //go:fix inline.
  • strings.go
    • Updated ToLower deprecation comment to use [github.com/gofiber/utils/v2/strings.ToLower] and added //go:fix inline.
    • Updated ToUpper deprecation comment to use [github.com/gofiber/utils/v2/strings.ToUpper] and added //go:fix inline.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the deprecation notices for several functions in bytes.go and strings.go. The changes include updating the Deprecated comments to a format that generates clickable links in godoc, and adding the //go:fix inline directive to enable automatic code migration via go fix. The implementation aligns with the recommendations for using these Go features. No issues were found in the changes.

@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Updates deprecation comments and adds //go:fix inline directives to utility functions in bytes and strings modules, guiding developers toward newer unsafe variants without altering any functionality.

Changes

Cohort / File(s) Summary
Deprecation and Go Fix Updates
bytes.go, strings.go
Updated deprecation comments to reference bracketed function paths (UnsafeToLower/UnsafeToUpper) and added //go:fix inline directives to facilitate automated migration of callers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

🧹 Updates

Suggested reviewers

  • ReneWerner87
  • sixcolors
  • gaby

Poem

🐰 The bytes and strings hop along with care,
Their deprecation notes now guide you there!
Go:fix directives point the weary way,
To unsafe variants, bright and gay! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The title 'docs: improve deprecated comments' accurately describes the main change in the PR, which updates deprecation comments and adds go:fix directives to enable automatic migration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@gaby gaby changed the title docs: improve deprecated comments; use go:fix inline 📒 docs: improve deprecated comments May 25, 2026
@ReneWerner87 ReneWerner87 merged commit 17647e0 into gofiber:master May 25, 2026
5 checks passed
@alexandear alexandear deleted the docs/improve-deprecated branch May 25, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📒 Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants