Skip to content

Commit 44da9c4

Browse files
committed
QF1012 - Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...))
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent 2764146 commit 44da9c4

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ linters:
2323
staticcheck:
2424
checks:
2525
- all
26-
- -QF1012 # Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...))

starlark/capture.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func captureOutput(source io.Reader, filePath, desc string, append bool) error {
204204
defer file.Close()
205205

206206
if len(desc) > 0 {
207-
if _, err := file.WriteString(fmt.Sprintf("%s\n", desc)); err != nil {
207+
if _, err := fmt.Fprintf(file, "%s\n", desc); err != nil {
208208
return err
209209
}
210210
}

0 commit comments

Comments
 (0)