trying_out_go/playground/calendar.go

25 lines
421 B
Go

// from chapter 10
package main
import (
"fmt"
"git.linuxhg.com/Go_Training/calendar"
)
func companyCalendar() {
event := calendar.Event{}
err := event.SetTitle("Mom's Birthday")
Error(err)
err = event.SetYear(2019)
Error(err)
err = event.SetMonth(5)
Error(err)
err = event.SetDay(27)
Error(err)
fmt.Println(event.Title())
fmt.Println(event.Year())
fmt.Println(event.Month())
fmt.Println(event.Day())
}