Created
June 20, 2020 08:06
-
-
Save reusee/25836c8a6faac925fe52c1c73d122a04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func foo() (err error) { | |
defer func() { | |
if e := f.Close(); e != nil && err == nil { | |
err = e | |
} | |
}() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment