Skip to content

assert.Regexp: Document allowed rx argument values #268 #1793

Description

@brackendawson

Reference: Antonboom/testifylint#81 (comment)

The Regexp and NotRegexp assertions accept interface{} for the rx (expression) argument. This is insane but we can't change it because it would be a breaking change. The documentation for these functions should be changed to explain that the value should be a *regexp.Regexp, but that if any other type is provided then the %v format of the value will be compiled as a new expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions