Skip to content

Commit

Permalink
fix: close file
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored Apr 18, 2024
1 parent 6c49209 commit f5ffb27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions go/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ func DumpDBModel(db *database.DB, table, cwd string) (string, error) {
if err != nil {
return "", fmt.Errorf("Can't careate model file: %v", err)
}
defer file.Close()
if _, err = io.Copy(file, sqlf); err != nil {
return "", fmt.Errorf("Can't dump model to local file")
}
Expand Down

0 comments on commit f5ffb27

Please sign in to comment.