docs: fix typos in GoDoc comments for quantity and error utility func…#6127
docs: fix typos in GoDoc comments for quantity and error utility func…#6127saiashok0981 wants to merge 1 commit into
Conversation
…tions Fix two misspelled function names in GoDoc comments within pkg/utils/quantity.go: - Line 40: 'TransfromQuantityToJindoUnit' -> 'TransformQuantityToJindoUnit' - Line 72: 'TranformQuantityToUnits' -> 'TransformQuantityToUnits' Fix typo in pkg/utils/errors.go IgnoreAlreadyExists comment: - 'already existes error' -> 'already exists error' Add missing GoDoc comment for the exported function IgnoreNoKindMatchError in pkg/utils/errors.go. Exported functions should always have a documentation comment per Go conventions (https://go.dev/blog/godoc), and the absence of one suppresses godoc output and linting warnings. These are documentation-only changes with zero runtime behavior impact. Signed-off-by: saiashok103@gmail.com
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @saiashok0981. Thanks for your PR. I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
There was a problem hiding this comment.
Code Review
This pull request corrects typos in function comments within pkg/utils/errors.go and pkg/utils/quantity.go, and adds descriptive documentation for the IgnoreNoKindMatchError function. The reviewer provided actionable suggestions to further improve the clarity and grammatical consistency of the documentation comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| ) | ||
|
|
||
| // IgnoreAlreadyExists ignores already existes error | ||
| // IgnoreAlreadyExists ignores already exists error |
There was a problem hiding this comment.
To improve clarity and grammatical correctness, this comment could be rephrased. The current phrasing 'ignores already exists error' is slightly awkward.
| // IgnoreAlreadyExists ignores already exists error | |
| // IgnoreAlreadyExists ignores errors indicating that a resource already exists. |
| } | ||
|
|
||
| // TransfromQuantityToJindoUnit transform a given input quantity to another one | ||
| // TransformQuantityToJindoUnit transform a given input quantity to another one |
There was a problem hiding this comment.
To fully align with GoDoc conventions, the verb in the summary sentence should be in the third-person singular form. The verb transform should be transforms.
| // TransformQuantityToJindoUnit transform a given input quantity to another one | |
| // TransformQuantityToJindoUnit transforms a given input quantity to another one |
|
@saiashok0981 — this PR is blocked from merging by a failing DCO check. Please resolve this now. For a single-commit PR: For multiple commits on this branch: The code review side is finished and any merge labels already on the PR will take effect once DCO turns green. Reference: https://github.com/apps/dco |
|
/copilot review |
| } | ||
|
|
||
| // TransfromQuantityToJindoUnit transform a given input quantity to another one | ||
| // TransformQuantityToJindoUnit transform a given input quantity to another one |
There was a problem hiding this comment.
Since you're already touching this line for the typo, worth making the GoDoc summary read as third-person singular: "transforms a given input quantity..." rather than "transform". Its sibling TransformQuantityToAlluxioUnit has the same quirk, so no need to chase that one here unless you feel like it.
| ) | ||
|
|
||
| // IgnoreAlreadyExists ignores already existes error | ||
| // IgnoreAlreadyExists ignores already exists error |
There was a problem hiding this comment.
Optional: "ignores already exists error" still reads a little terse. Something like "ignores errors indicating that a resource already exists" flows better, but the current fix is already correct — fine to leave as-is.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6127 +/- ##
=======================================
Coverage 65.08% 65.08%
=======================================
Files 485 485
Lines 33989 33989
=======================================
Hits 22122 22122
Misses 10126 10126
Partials 1741 1741 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Fix three GoDoc documentation errors across pkg/utils/quantity.go and pkg/utils/errors.go: two misspelled function names in doc comments and one typo in an existing comment. Additionally, add the missing GoDoc comment for the exported function IgnoreNoKindMatchError.
Motivation
Go's documentation convention (godoc) requires that every exported identifier is documented, and that the doc comment begins with the name of the identifier. When GoDoc comment function names are misspelled, automated API documentation generators and IDE tooling (e.g., gopls hover) produce misleading output. The IgnoreNoKindMatchError function was previously exported with no comment at all, which suppresses its entry in generated docs and triggers golint / revive lint warnings.
Fixing these now reduces technical documentation debt and ensures consistency across the pkg/utils package, which is among the most widely used internal packages in this repository.
Signed-off-by: saiashok103@gmail.com