Skip to content

Instantly share code, notes, and snippets.

@jjuliano
Last active December 16, 2019 11:07
Show Gist options
  • Save jjuliano/fcbc06ef5408c73ad18168b821af023b to your computer and use it in GitHub Desktop.
Save jjuliano/fcbc06ef5408c73ad18168b821af023b to your computer and use it in GitHub Desktop.
func (receiverName receiverType) functionName(parameterName parameterType) {
// we can set the value of an _already initialised_ receiver type
// but we cannot modify the receiver type directly
receiverName = parameterName
// we can access the value of the _already initialised_ receiver type (getters)
fmt.Println(receiverName)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment