stretchr/testify
在 GitHub 查看require: invalid examples from doc comments as functions don't return bool
Open
#1,776 建立於 2025年8月4日
bugdocumentationgood first issue
倉庫指標
- Star
- (25,958 star)
- PR 合併指標
- (平均合併 6天 15小時) (30 天內合併 2 個 PR)
描述
Description
The doc comments for multiple functions in the require package have code examples that are invalid. Example:
The example reads:
if require.NoError(t, err) {
require.Equal(t, expectedObj, actualObj)
}
but the NoError() function does not return any value, so this is invalid.
There are similar invalid examples in the doc comments for NoErrorf, NotEmpty and NotEmptyf.