Skip to content

Commit 76c5837

Browse files
committed
Refactor
1 parent 61e3528 commit 76c5837

File tree

1 file changed

+0
-2
lines changed
  • 069-social-network-built-in-go-and-gopherjs/models/socialmedia

1 file changed

+0
-2
lines changed

069-social-network-built-in-go-and-gopherjs/models/socialmedia/socialmedia.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ func init() {
6161
Moods = map[string]MoodState{"neutral": MoodStateNeutral, "happy": MoodStateHappy, "sad": MoodStateSad, "angry": MoodStateAngry, "hopeful": MoodStateHopeful, "thrilled": MoodStateThrilled, "bored": MoodStateBored, "shy": MoodStateShy, "comical": MoodStateComical, "cloudnine": MoodStateOnCloudNine}
6262

6363
MoodsEmoji = map[MoodState]string{MoodStateNeutral: "\xF0\x9F\x98\x90", MoodStateHappy: "\xF0\x9F\x98\x8A", MoodStateSad: "\xF0\x9F\x98\x9E", MoodStateAngry: "\xF0\x9F\x98\xA0", MoodStateHopeful: "\xF0\x9F\x98\x8C", MoodStateThrilled: "\xF0\x9F\x98\x81", MoodStateBored: "\xF0\x9F\x98\xB4", MoodStateShy: "\xF0\x9F\x98\xB3", MoodStateComical: "\xF0\x9F\x98\x9C", MoodStateOnCloudNine: "\xF0\x9F\x98\x82"}
64-
6564
}
6665

6766
// NewPost is responsible for creating an instance of the Post type.
6867
func NewPost(username string, mood MoodState, caption string, messageBody string, url string, imageURI string, thumbnailURI string, keywords []string) *Post {
69-
7068
auditableContent := AuditableContent{CreatedBy: username, TimeCreated: time.Now()}
7169
return &Post{Caption: caption, MessageBody: messageBody, URL: url, ImageURI: imageURI, ThumbnailURI: thumbnailURI, AuthorMood: mood, Keywords: keywords, AuditableContent: auditableContent, AuthorMoodEmoji: MoodsEmoji[mood]}
7270
}

0 commit comments

Comments
 (0)