Skip to content

Commit

Permalink
allocates and initializes an object
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Mar 14, 2024
1 parent 2b1394b commit d091f94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/gno.land/r/demo/postit/public.gno
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func CreatePost(body, attachment string) string {
Body: body,
Attachment: attachment,

LikedBy: make([]string, 0),
Comments: make([]Comment, 0),

CreatedAt: time.Now(),
}
strId := strconv.FormatUint(post.Id, 10)
Expand Down

0 comments on commit d091f94

Please sign in to comment.