require: fix godoc generation for assertions returning a bool#1850
Merged
dolmen merged 1 commit intostretchr:masterfrom Feb 17, 2026
Merged
require: fix godoc generation for assertions returning a bool#1850dolmen merged 1 commit intostretchr:masterfrom
dolmen merged 1 commit intostretchr:masterfrom
Conversation
dolmen
approved these changes
Feb 17, 2026
Collaborator
|
@Baxromumarov Please fix the commit message to "require: fix godoc generation for assertions returning a bool" |
da09cf4 to
43f6438
Compare
Author
@dolmen |
Author
|
@dolmen i don't have access to merge, if my changes are ok please merge it |
dolmen
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The doc comments for multiple functions in the require package have code examples that are invalid. Example, function doesn't return anything but in the comment it says it return bool value:
testify/require/require.go
Lines 1391 to 1394 in 3f28143
Changes
Changed require.go.tmpl, require_forward.go.tmpl added new generator for them
Motivation
There was a related issue, and the misleading comments needed to be fixed
Issue #1776