chore: add more tests (#3016)

This commit is contained in:
Kevin Wan
2023-03-11 22:22:39 +08:00
committed by GitHub
parent cca45be3c5
commit 211b9498ef
4 changed files with 342 additions and 4 deletions

View File

@@ -379,8 +379,7 @@ func createTempFile(body []byte) (string, error) {
}
tmpFile.Close()
err = os.WriteFile(tmpFile.Name(), body, os.ModePerm)
if err != nil {
if err = os.WriteFile(tmpFile.Name(), body, os.ModePerm); err != nil {
return "", err
}