Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marvinhosea/635949a511b606daf2dad50f3d91a1c7 to your computer and use it in GitHub Desktop.
Save marvinhosea/635949a511b606daf2dad50f3d91a1c7 to your computer and use it in GitHub Desktop.
Sample Code Go ~ Rick n Motty
package main
import "fmt"
type ricknmotty string
func (r ricknmotty) getWords() (string string){
if r == "Rick"{
return "We got a big announcement to make, Motty do you wanna make the announcement?"
}
return "no, no, no i don't wanna make the announcement"
}
func main(){
var r ricknmotty = "Rick"
fmt.Printf(r.getWords())
}
func (r ricknmotty) printWords() {
fmt.Println(r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment