how to implement struct functions in golang code example
Example: go struct methods
type Person struct {
name string
surname string
}
func (p Person) GetName() string {
return p.name
}
func (p Person) GetSurname() string {
return p.surname
}