Initial commit with methods module

This commit is contained in:
Fabio Scotto di Santolo
2024-11-19 12:22:09 +01:00
parent cbe2ed118f
commit ecb4ea20a8
8 changed files with 65 additions and 2 deletions

13
methods/models/student.go Normal file
View File

@@ -0,0 +1,13 @@
package models
import "fmt"
type Student struct {
Person
Class string
}
// Presentation - Greet the teacher and show up
func (s Student) Presentation() string {
return fmt.Sprintf("Good morning teacher, I'm %s %s.\n", s.Person.Name, s.Person.LastName)
}