From bd4c8fb4a96d3b1efc8e0242c9758d3193002af3 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 30 Aug 2023 16:16:53 +0200 Subject: [PATCH] Limit title to 80 chars --- sn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sn.go b/sn.go index 5297920..dd1a3aa 100644 --- a/sn.go +++ b/sn.go @@ -38,7 +38,7 @@ func PostStoryToStackerNews(story *Story, options PostStoryOptions) (int, error) } } - parentId, err := sn.PostLink(url, story.Title, "tech") + parentId, err := sn.PostLink(url, story.Title[0:80], "tech") if err != nil { return -1, fmt.Errorf("error posting link: %w", err) }