Make comments more useful

This commit is contained in:
2025-01-24 23:06:32 +01:00
parent be79a13d48
commit 9ab48787d4
23 changed files with 115 additions and 93 deletions

View File

@@ -10,13 +10,13 @@ type Date struct {
DateTime string `xml:",chardata"`
}
// DateTime formats a time.Time to string formated as defined by RFC3339. It
// DateTime formats the time.Time t to a string as defined by RFC3339. It
// returns a string.
func DateTime(t time.Time) string {
return t.Format(time.RFC3339)
}
// NewDate creates a new Date. It returns a *Date.
// NewDate creates a new Date. It takes in a time.Time t and returns a *Date.
func NewDate(t time.Time) *Date {
return &Date{
CommonAttributes: NewCommonAttributes(),