Eli Bendersky 7c160440be Use tabs as the canonical source indentation in git
Space conversion is done during generation only. Fixes #192
2019-06-04 07:30:58 -07:00

23 lines
467 B
Go

// Use `os.Exit` to immediately exit with a given
// status.
package main
import "fmt"
import "os"
func main() {
// `defer`s will _not_ be run when using `os.Exit`, so
// this `fmt.Println` will never be called.
defer fmt.Println("!")
// Exit with status 3.
os.Exit(3)
}
// Note that unlike e.g. C, Go does not use an integer
// return value from `main` to indicate exit status. If
// you'd like to exit with a non-zero status you should
// use `os.Exit`.