Difference between revisions of "Defer"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
== Example ==
 
== Example ==
  
  package main
+
  [[package main]]
  import "fmt"
+
  [[import]] "fmt"
 
   
 
   
 
  [[func]] main() {
 
  [[func]] main() {

Latest revision as of 15:58, 21 August 2022


Example[edit]

package main
import "fmt"

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

	fmt.Println("hello")
}

See also[edit]

Advertising: