MCPcopy Index your code
hub / github.com/writefreely/writefreely / processPost

Method processPost

posts.go:1195–1204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1193}
1194
1195func (p *Post) processPost() PublicPost {
1196 res := &PublicPost{Post: p, Views: 0}
1197 res.Views = p.ViewCount
1198 res.Likes = p.LikeCount
1199 // TODO: move to own function
1200 loc := monday.FuzzyLocale(p.Language.String)
1201 res.DisplayDate = monday.Format(p.Created, monday.LongFormatsByLocale[loc], loc)
1202
1203 return *res
1204}
1205
1206func (p *PublicPost) CanonicalURL(hostName string) string {
1207 if p.Collection == nil || p.Collection.Alias == "" {

Callers 12

viewCollectionPostFunction · 0.95
GetEditablePostMethod · 0.95
GetPostMethod · 0.95
GetOwnedPostMethod · 0.95
GetPostsMethod · 0.95
GetPostsTaggedMethod · 0.95
GetLangPostsMethod · 0.95
GetPinnedPostsMethod · 0.95
GetTopPostsMethod · 0.95
GetAnonymousPostsMethod · 0.95
GetUserPostsMethod · 0.95
FetchPublicPostsMethod · 0.95

Calls 1

FormatMethod · 0.80

Tested by

no test coverage detected