mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 05:33:04 +08:00
18 lines
230 B
Go
18 lines
230 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
|
|
}
|
|
|
|
|
|
|