Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Last active February 15, 2023 03:16
Show Gist options
  • Save Mayankgupta688/f99b1e3a1e1b489a7d50905354f9fab1 to your computer and use it in GitHub Desktop.
Save Mayankgupta688/f99b1e3a1e1b489a7d50905354f9fab1 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func updateData(currentScope string) {
fmt.Println(currentScope)
}
func updateDataOther(currentScope string) {
fmt.Println(currentScope)
}
func main() {
defer updateData("First Defered Function Called")
defer updateDataOther("Second Defered Function Called")
currentScope := "Main Function"
fmt.Println("Original values is ", currentScope)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment