bugfix exit
This commit is contained in:
parent
09650cff6a
commit
76658c8a06
@ -1,15 +1,16 @@
|
||||
// Use `os.Exit` to immediatly exit with a given
|
||||
// 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 `println` will never be called.
|
||||
defer println("!")
|
||||
// this `fmt.Println` will never be called.
|
||||
defer fmt.Println("!")
|
||||
|
||||
// Exit with status 3.
|
||||
os.Exit(3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user