Initial commit with methods module
This commit is contained in:
22
methods/main.go
Normal file
22
methods/main.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
dto "nutshell/methods/models"
|
||||
)
|
||||
|
||||
func main() {
|
||||
student := dto.Student{
|
||||
Person: dto.Person{
|
||||
Name: "Joe",
|
||||
LastName: "Doe",
|
||||
Age: 33,
|
||||
},
|
||||
Class: "5A",
|
||||
}
|
||||
showUp(student)
|
||||
}
|
||||
|
||||
func showUp(p dto.Presenter) {
|
||||
fmt.Println(p.Presentation())
|
||||
}
|
||||
Reference in New Issue
Block a user