From e826734316f306df0cea38c9c234010c75b18290 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Wed, 20 Dec 2017 18:31:36 -0800 Subject: comments in post.go --- post/post.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/post/post.go b/post/post.go index 8f96c8d..4644a50 100644 --- a/post/post.go +++ b/post/post.go @@ -215,7 +215,7 @@ func NormalizeTag(tag string) string { } /* -splitText splits up p.Unparsed into p.Text and p.Meta[attr][value] +splitText splits p.Unparsed into p.Text and p.Meta[attr][value] */ func (p *Post) splitTextMeta() { if p.Unparsed == "" { @@ -297,7 +297,7 @@ func (p *Post) parseDates() { } /* -Given p.Time is correct, create the other derived date fields +Given p.Time, create the other derived date fields */ func (p *Post) fillDates() { p.Year, p.Month, p.Day = p.Time.Date() @@ -366,6 +366,9 @@ func (posts Posts) Limit(limit int) Posts { } } +/* +ContainsTag returns true if Post `p` has `tag` in its set of tags. +*/ func (p *Post) ContainsTag(tag string) bool { for _, t := range p.Tags { if t == tag { -- cgit v1.2.3