Last active
February 15, 2023 03:16
-
-
Save Mayankgupta688/f99b1e3a1e1b489a7d50905354f9fab1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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