Use .WriteString( instead of .Write([]byte(…

This commit is contained in:
jvoisin 2024-02-29 00:28:10 +01:00 committed by Frédéric Guillot
parent b04550e2f2
commit 61af08a721
2 changed files with 2 additions and 2 deletions

View file

@ -1944,7 +1944,7 @@ func TestParseConfigDumpOutput(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if _, err := tmpfile.Write([]byte(serialized)); err != nil { if _, err := tmpfile.WriteString(serialized); err != nil {
t.Fatal(err) t.Fatal(err)
} }

View file

@ -132,7 +132,7 @@ func getArticle(topCandidate *candidate, candidates candidateList) string {
} }
}) })
output.Write([]byte("</div>")) output.WriteString("</div>")
return output.String() return output.String()
} }