fix(fs): fix issues related to closing fd
This commit is contained in:
parent
70dda37c54
commit
5e8567d470
8 changed files with 120 additions and 105 deletions
|
@ -58,12 +58,12 @@ func waitForReady(addr string) bool {
|
|||
}
|
||||
|
||||
func compareFileContent(fs fspkg.ISimpleFS, uid, filePath string, expectedContent string) (bool, error) {
|
||||
reader, err := fs.GetFileReader(filePath)
|
||||
reader, id, err := fs.GetFileReader(filePath)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
defer func() {
|
||||
err = fs.CloseReader(filePath)
|
||||
err = fs.CloseReader(fmt.Sprint(id))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue