From e9142b9d7a2faf5c7dc5b13a621d3a216bce8e54 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 7 Nov 2024 09:21:23 +0200 Subject: add image url to String output --- internal/platforms/linkedin/preview.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal') diff --git a/internal/platforms/linkedin/preview.go b/internal/platforms/linkedin/preview.go index 6d1dd32..765a487 100644 --- a/internal/platforms/linkedin/preview.go +++ b/internal/platforms/linkedin/preview.go @@ -38,6 +38,9 @@ func NewPreview(ctx context.Context, urls []string) (preview, error) { } func (p preview) String() string { + if p.imageURL != "" { + return fmt.Sprintf("Title: %s; URL: %s, Image: %s", p.title, p.url, p.imageURL) + } return fmt.Sprintf("Title: %s; URL: %s", p.title, p.url) } -- cgit v1.2.3