Skip to content

strings: documentation refers to non-existent function SplitFunc #75462

@tobyb121

Description

@tobyb121

Go version

go version 1.25.1

Output of go env in your module/workspace:

N/A

What did you do?

I noticed in the function documentation for strings.FieldsFunc it refers to SplitFunc when describing the behaviour of the function. https://pkg.go.dev/strings#FieldsFunc

What did you see happen?

This function does not exist in this package, there is a type https://pkg.go.dev/bufio#SplitFunc, however I do not think this makes sense in the context.

This seems to be an oversight as it is mirroring the documentation of the Fields function, which correctly refers to the behaviour of Split.

What did you expect to see?

For symmetry with the Fields* functions in the strings package, I'd expect to see a SplitFunc, SplitFuncSeq, SplitNFunc, SplitNFuncSeq, SplitAfterFunc, SplitAfterFuncSeq, SplitAfterNFunc, SplitAfterNFuncSeq

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions