Skip to content

Commit eafdd36

Browse files
committed
Use %s together with fmt.Errorf
1 parent 9c337e0 commit eafdd36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/upload/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (ulf *UploadedFile) write(fullFilename string, fperm os.FileMode) error {
164164
// Check if the file already exists
165165
if _, err := os.Stat(fullFilename); err == nil { // exists
166166
logrus.Error(fullFilename, " already exists")
167-
return fmt.Errorf("File exists: " + fullFilename)
167+
return fmt.Errorf("File exists: %s", fullFilename)
168168
}
169169
// Write the uploaded file
170170
f, err := os.OpenFile(fullFilename, os.O_WRONLY|os.O_CREATE, fperm)

0 commit comments

Comments
 (0)