file close check and close. (#10554)

Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
This commit is contained in:
湛露先生
2025-05-05 06:37:59 +08:00
committed by GitHub
parent 6a74bba7e7
commit 7e5c8eee5c
2 changed files with 2 additions and 0 deletions

View File

@@ -130,6 +130,7 @@ func TestConvertModel(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer expectFile.Close()
var expect map[string]string
if err := json.NewDecoder(expectFile).Decode(&expect); err != nil {