repl.it
@MayankGupta5/

usingDefer

Go

No description

fork
loading
Files
  • main.go
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

import "fmt"

func returnMessage() {
  fmt.Println("This is Simple Defer Function Execution")  
}

func main() {
  defer returnMessage()
  fmt.Println("This is line One")
  fmt.Println("This is line Two")
  fmt.Println("This is line Three")
}