go/base: Do not ignore f.Close error
This commit is contained in:
parent
2b69a5d53e
commit
c6a6a533a1
@ -40,10 +40,9 @@ func FileExists(fileName string) bool {
|
|||||||
func TouchFile(fileName string) error {
|
func TouchFile(fileName string) error {
|
||||||
f, err := os.OpenFile(fileName, os.O_APPEND|os.O_CREATE, 0755)
|
f, err := os.OpenFile(fileName, os.O_APPEND|os.O_CREATE, 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return (err)
|
return err
|
||||||
}
|
}
|
||||||
defer f.Close()
|
return f.Close()
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StringContainsAll returns true if `s` contains all non empty given `substrings`
|
// StringContainsAll returns true if `s` contains all non empty given `substrings`
|
||||||
|
Loading…
Reference in New Issue
Block a user