Documentation
¶
Index ¶
Constants ¶
View Source
const MaxTweetLen = 280 // characters
Variables ¶
View Source
var ErrTweetTooLong = errors.New("tweets must have less than 280 characters")
Functions ¶
This section is empty.
Types ¶
type Tweet ¶
type Tweet struct { UserID uint `json:"userId"` Timestamp time.Time `json:"timestamp"` Content string `json:"content"` }
func NewTweet ¶
NewTweet creates a tweet.
Returns ErrTweetTooLong if content len is bigger than 280 characters
func (Tweet) MarshalBinary ¶
Implement encoding.BinaryMarshaler
Click to show internal directories.
Click to hide internal directories.