Go method to prevent main function from exiting

Go method to prevent main function from exiting

1:
func main() {
    defer func() { for {} }()
}

2:
func main() {
    defer func() { select {} }()
}

3:
func main() {
    defer func() { <-make(chan bool) }()
}

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example