CDR request 2
This commit is contained in:
parent
862833fcb8
commit
b00cb1ec7e
@ -41,6 +41,7 @@ func writeFile(f *os.File) {
|
||||
func closeFile(f *os.File) {
|
||||
fmt.Println("closing")
|
||||
err := f.Close()
|
||||
// It is important to check for errors when closing a file, even in a deferred function.
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
os.Exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user