Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Created November 21, 2019 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mayankgupta688/e8e810149085c4c12d999d969c3a8ff3 to your computer and use it in GitHub Desktop.
Save Mayankgupta688/e8e810149085c4c12d999d969c3a8ff3 to your computer and use it in GitHub Desktop.
func UpdateEmployee(empDetials *Employee) {
empDetails.Name = "Anshul";
}
var newEmployee = Employee{Name: "Mayank", Age: 40, Designation: "Developer"}
UpdateEmployee(&newEmployee)
// The original Object sent to the function Updated...
fmt.Println(newEmployee.Name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment