Initial commit with methods module
This commit is contained in:
14
methods/models/person.go
Normal file
14
methods/models/person.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package models
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Person struct {
|
||||
Name string
|
||||
LastName string
|
||||
Age int
|
||||
}
|
||||
|
||||
// Presentation - Greet everyone and show up
|
||||
func (p Person) Presentation() string {
|
||||
return fmt.Sprintf("Hi, everyone! I'm %s %s and I have %d years old.\n", p.Name, p.LastName, p.Age)
|
||||
}
|
||||
Reference in New Issue
Block a user