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

Method DisplayTitle

posts.go:214–220  ·  view source on GitHub ↗

DisplayTitle dynamically generates a title from the Post's contents if it doesn't already have an explicit title.

()

Source from the content-addressed store, hash-verified

212// DisplayTitle dynamically generates a title from the Post's contents if it
213// doesn't already have an explicit title.
214func (p *Post) DisplayTitle() string {
215 if p.Title.String != "" {
216 return p.Title.String
217 }
218 t := friendlyPostTitle(p.Content, p.ID)
219 return t
220}
221
222// PlainDisplayTitle dynamically generates a title from the Post's contents if it
223// doesn't already have an explicit title.

Callers 10

PlainDisplayTitleMethod · 0.95
FormattedDisplayTitleMethod · 0.95
ActivityObjectMethod · 0.45
viewEditCollectionFunction · 0.45
handleViewSubscribersFunction · 0.45
handleGopherFunction · 0.45
handleGopherCollectionFunction · 0.45
ViewFeedFunction · 0.45
emailPostFunction · 0.45
sendSubConfirmEmailFunction · 0.45

Calls 1

friendlyPostTitleFunction · 0.85

Tested by

no test coverage detected