Skip to content

Suggest strings.ContainsFunc instead of strings.IndexFunc with Go 1.21+#1435

Open
scop wants to merge 1 commit into
dominikh:masterfrom
scop:feat/strings-containsfunc
Open

Suggest strings.ContainsFunc instead of strings.IndexFunc with Go 1.21+#1435
scop wants to merge 1 commit into
dominikh:masterfrom
scop:feat/strings-containsfunc

Conversation

@scop

@scop scop commented Aug 20, 2023

Copy link
Copy Markdown

No description provided.

@scop scop force-pushed the feat/strings-containsfunc branch 2 times, most recently from 7fb55ea to 0cd4d75 Compare August 20, 2023 16:21
@dominikh dominikh closed this Feb 25, 2026
@dominikh dominikh reopened this Feb 25, 2026
@scop scop force-pushed the feat/strings-containsfunc branch from 0cd4d75 to 1c3615e Compare February 26, 2026 20:42
@scop

scop commented Feb 26, 2026

Copy link
Copy Markdown
Author

Reworked against current master.

@scop

scop commented Mar 2, 2026

Copy link
Copy Markdown
Author

@dominikh JFYI in case it went unnoticed, I rebased this against current master a couple of days ago, should be ready to go.

@ccoVeille

Copy link
Copy Markdown

The PR is 3 years old. The need is real. But isn't isn't this addressed by Go official modernizer ? Now shipped with go fix ?

@dominikh

dominikh commented Mar 2, 2026

Copy link
Copy Markdown
Owner

@dominikh JFYI in case it went unnoticed, I rebased this against current master a couple of days ago, should be ready to go.

I saw, thanks. I'll try to look at this soon, as I work through my backlog. Though if this is in modernize these days, there's not much need for it in Staticcheck.

@scop

scop commented Mar 3, 2026

Copy link
Copy Markdown
Author

Modernize/go fix only do slices.Contains(Func), not the corresponding strings/bytes ones staticcheck does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants