blob: 26412dc8d59130abece3386d9c20f299947ea547 [file] [log] [blame]
package sample // OMIT
func run() (err error) {
in, err := os.Open(*input)
if err != nil {
return err
}
defer in.Close()
out, err := os.Create(*output)
if err != nil {
return err
}
defer func() { // HL
if cerr := out.Close(); err == nil { // HL
err = cerr // HL
} // HL
}() // HL
// some code
}