Skip to content

Documentation issue for regexp.Find(...) #4299

@JensRantil

Description

@JensRantil

https://pkg.go.dev/cuelang.org/go@v0.16.0/pkg/regexp#Find states

Find returns a list holding the text of the leftmost match in b of the regular expression. A return value of bottom indicates no match.

but given that the function signature looks like func Find(pattern, s string) (string, error), I wonder - should the documentation really say it is returning a list? I would expect something like this:

Find returns a string holding the text of the leftmost match in b of the regular expression. A return value of bottom indicates no match.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions