mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:34:15 +08:00
15 lines
210 B
Go
15 lines
210 B
Go
package person
|
|
|
|
type Person struct {
|
|
firstName string
|
|
lastName string
|
|
}
|
|
|
|
func (p *Person) FirstName() string {
|
|
return p.firstName
|
|
}
|
|
|
|
func (p *Person) SetFirstName(newName string) {
|
|
p.firstName = newName
|
|
}
|