made sure each file closed after stating them
This commit is contained in:
parent
9a090ca397
commit
c78f6aa535
@ -14,6 +14,8 @@ func timeToString(currentTime time.Time) string {
|
|||||||
func osfileToSting(currentOsFile *os.File) string {
|
func osfileToSting(currentOsFile *os.File) string {
|
||||||
file, err := os.Open(currentOsFile.Name())
|
file, err := os.Open(currentOsFile.Name())
|
||||||
|
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
fileinfo, err := file.Stat()
|
fileinfo, err := file.Stat()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user