Skip to content

Commit e0cc052

Browse files
committed
Add link in posts
1 parent 9917de9 commit e0cc052

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Gopkg.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
# unused-packages = true
2626

2727

28-
[[constraint]]
29-
name = "github.com/manifoldco/promptui"
30-
version = "0.3.2"
31-
3228
[[constraint]]
3329
name = "github.com/mitchellh/go-homedir"
3430
version = "1.0.0"

pkg/posts/post.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ func openPost(app *tview.Application, postcuid string, list *tview.List) {
3838
author := fmt.Sprintf("Author: %s", singlePost.Post.Author.Name)
3939
upvotes := fmt.Sprintf("Upvotes: %d", singlePost.Post.Upvotes)
4040
ptype := fmt.Sprintf("Type: %s", singlePost.Post.Type)
41+
link := fmt.Sprintf("Link: https://hashnode.com/post/%s", singlePost.Post.Cuid)
4142
writeToTextView(textView, title,
4243
author,
4344
upvotes,
4445
ptype,
46+
link,
4547
"\n",
4648
singlePost.Post.ContentMarkdown,
4749
)

0 commit comments

Comments
 (0)