Skip to content

Commit

Permalink
Reformat example code on PostDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
thebaer committed Apr 4, 2023
1 parent 4e8d67e commit 4934315
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions posts/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ func FriendlyPostTitle(content, friendlyId string) string {
// choosing what to generate. In case a post has a title, this function will
// fail, and logic should instead be implemented to skip this when there's no
// title, like so:
// var desc string
// if title == "" {
// desc = PostDescription(content, title, friendlyId)
// } else {
// desc = ShortPostDescription(content)
// }
//
// var desc string
// if title == "" {
// desc = PostDescription(content, title, friendlyId)
// } else {
// desc = ShortPostDescription(content)
// }
func PostDescription(content, title, friendlyId string) string {
maxLen := 140

Expand Down

0 comments on commit 4934315

Please sign in to comment.