bugfix exit

This commit is contained in:
Mark McGranaghan 2012-10-22 08:27:35 -04:00
parent 09650cff6a
commit 76658c8a06

View File

@ -1,15 +1,16 @@
// Use `os.Exit` to immediatly exit with a given // Use `os.Exit` to immediately exit with a given
// status. // status.
package main package main
import "fmt"
import "os" import "os"
func main() { func main() {
// `defer`s will _not_ be run when using `os.Exit`, so // `defer`s will _not_ be run when using `os.Exit`, so
// this `println` will never be called. // this `fmt.Println` will never be called.
defer println("!") defer fmt.Println("!")
// Exit with status 3. // Exit with status 3.
os.Exit(3) os.Exit(3)