package main import "fmt" func main() { // Termination: a batch program must still be stoppable, so the entry // handles the channel the runtime closes on SIGINT/SIGTERM. select { case <-shutdown: return default: } tag := "outer" render := func() (tag string) { tag = "closure" return tag } fmt.Println(render(), tag) }