1package microposts
2
3import (
4 "time"
5)
6
7type Post struct {
8 text string
9 author address
10 createdAt time.Time
11}
12
13func (p Post) String() string {
14 out := p.text + "\n"
15 out += "_" + p.createdAt.Format("02 Jan 2006, 15:04") + ", by " + p.author.String() + "_"
16 return out
17}