Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Created November 22, 2019 06:46
Show Gist options
  • Select an option

  • Save Mayankgupta688/ef27988aad0478e5a915a373c77757b1 to your computer and use it in GitHub Desktop.

Select an option

Save Mayankgupta688/ef27988aad0478e5a915a373c77757b1 to your computer and use it in GitHub Desktop.
type Employee struct {
Name string
Age int
Designation string
Salary int
}
func (emp Employee) ShowDetails() {
fmt.Println("User Name: ", emp.Name)
}
var newEmployee = new(Employee)
newEmployee.Name = "Mayank"
newEmployee.ShowDetails()
@PANDATD

PANDATD commented Jun 3, 2021

Copy link
Copy Markdown

Please explain me ShowDetails()funcation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment