Difference between revisions of "Defer"

From wikieduonline
Jump to navigation Jump to search
(Created page with "{{lc}} * https://go.dev/tour/flowcontrol/12 == See also == * {{Go}} Category:Go")
 
Line 2: Line 2:
 
* https://go.dev/tour/flowcontrol/12
 
* https://go.dev/tour/flowcontrol/12
  
 +
<pre>
 +
package main
 +
 +
import "fmt"
 +
 +
func main() {
 +
defer fmt.Println("world")
 +
 +
fmt.Println("hello")
 +
}
 +
</pre>
  
 
== See also ==
 
== See also ==

Revision as of 15:54, 21 August 2022

package main

import "fmt"

func main() {
	defer fmt.Println("world")

	fmt.Println("hello")
}

See also

Advertising: