Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mamo3gr
Copy link
Contributor

@mamo3gr mamo3gr commented Mar 27, 2025

Problem

A linter Staticcheck, which could be included in golangci-lint, warns QF1004 in the generated code:
https://staticcheck.dev/docs/checks/#QF1004

Use strings.ReplaceAll instead of strings.Replace with n == -1

Solution

Do what the linter says.
There seems not to be any drawback so all replacement are applied in an automatic manner (including test data).

@raphael
Copy link
Member

raphael commented Mar 27, 2025

This is great, thank you!

@raphael raphael enabled auto-merge (squash) March 27, 2025 17:47
@raphael raphael merged commit 22cc08c into goadesign:v3 Mar 27, 2025
13 checks passed
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.

2 participants