Skip to content

Commit a46718f

Browse files
committed
Lint: staticcheck fix QF1004
Note that QF1009 has been fixed by previous commits working on revive. Signed-off-by: apostasie <[email protected]>
1 parent 8893fe4 commit a46718f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ linters:
5454
# FIXME: this below this point is disabled for now, but we should investigate
5555
- "-QF1008" # Omit embedded fields from selector expression https://staticcheck.dev/docs/checks#QF1008
5656
- "-QF1003" # Convert if/else-if chain to tagged switch https://staticcheck.dev/docs/checks#QF1003
57-
- "-QF1009" # Use time.Time.Equal instead of == operator https://staticcheck.dev/docs/checks#QF1009
5857
- "-QF1001" # Apply De Morgan’s law https://staticcheck.dev/docs/checks#QF1001
5958
- "-QF1012" # Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...)) https://staticcheck.dev/docs/checks#QF1012
6059
- "-ST1005" # Expand call to math.Pow https://staticcheck.dev/docs/checks#QF1005
61-
- "-QF1004" # Use strings.ReplaceAll instead of strings.Replace with n == -1 https://staticcheck.dev/docs/checks#QF1004
6260
revive:
6361
enable-all-rules: true
6462
rules:

pkg/dnsutil/hostsstore/hosts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func parseHostsButSkipMarkedRegion(w io.Writer, r io.Reader) error {
5252
LINE:
5353
for scanner.Scan() {
5454
line := scanner.Text()
55-
line = strings.Replace(strings.Trim(line, " \t"), "\t", " ", -1)
55+
line = strings.ReplaceAll(strings.Trim(line, " \t"), "\t", " ")
5656
sawMarkerEnd := false
5757
if strings.HasPrefix(line, "#") {
5858
com := strings.TrimSpace(line[1:])

0 commit comments

Comments
 (0)