Quick actions

cmd+k|ctrl+k

Navigation

Languages

Essential Go / Methods

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-03-26T10:10:13Z

Updated

2019-03-26T10:10:13Z

package main

import "fmt"

type Person struct {
	FirstName string
	LastName  string
}

func (p *Person) PrintFullName() {
	fmt.Printf("%s %s\n", p.FirstName, p.LastName)
}

func main() {
	p := &Person{
		"John",
		"Doe",
	}
	p.PrintFullName()
}
INFO