Skip to content

Commit 37df061

Browse files
fix: fix the wrong error return value (#1161)
Signed-off-by: cangqiaoyuzhuo <850072022@qq.com>
1 parent 2de95d1 commit 37df061

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libvirt/resource_libvirt_domain_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,8 @@ func createNvramFile(_ *testing.T) (string, error) {
11891189
if err != nil {
11901190
return "", err
11911191
}
1192-
if file.Close() != nil {
1193-
return "", err
1192+
if errF := file.Close(); errF != nil {
1193+
return "", errF
11941194
}
11951195
return file.Name(), nil
11961196
}

0 commit comments

Comments
 (0)