L
L
LittleBuster2015-05-31 23:50:24
go
LittleBuster, 2015-05-31 23:50:24

Go how to terminate the program?

Question: how to exit a Go program by analogy with Python's sys.exit()? Or just how to stop listening to net.Listener so that the program closes itself? The flags on the while loop did not help because the goroutine runs slower than a new round of wiretapping begins.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
index0h, 2015-06-01
@LittleBuster

os.Exit

U
uvelichitel, 2015-06-02
@uvelichitel

runtime.goexit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question