Skip to content

Commit 9f85824

Browse files
committed
chore: update implementation
1 parent cac148a commit 9f85824

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pkg/golinters/modernize/testdata/fix/out/fmtappendf.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ func comma() {
3535
type S struct{ Bytes []byte }
3636
var _ = struct{ A S }{
3737
A: S{
38-
Bytes: // want "Replace .*Sprint.* with fmt.Appendf"
39-
fmt.Appendf(nil, "%d", 0),
38+
Bytes: fmt.Appendf(nil, "%d", 0),
4039
},
4140
}
42-
_ = // want "Replace .*Sprint.* with fmt.Appendf"
43-
fmt.Appendf(nil, "%d", 0)
41+
_ = fmt.Appendf(nil, "%d", 0)
4442
}

pkg/golinters/modernize/testdata/fix/out/stringscutprefix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func _() {
104104
}
105105
var ok bool // define an ok variable to test the fix won't shadow it for its if stmt body
106106
_ = ok
107-
if after, ok0 := strings.CutPrefix(s, pre); ok0 { // want "TrimPrefix can be simplified to CutPrefix"
107+
if after, ok := strings.CutPrefix(s, pre); ok { // want "TrimPrefix can be simplified to CutPrefix"
108108
println(after)
109109
}
110110
var predefined string

0 commit comments

Comments
 (0)