summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-11-07 09:21:23 +0200
committerPaul Buetow <paul@buetow.org>2024-11-07 09:21:23 +0200
commite9142b9d7a2faf5c7dc5b13a621d3a216bce8e54 (patch)
treecd555a8d0d061889c2ad283e5fec20da9b63db91 /internal
parent2a458a132244c36217acfd4fb718d9250ff1e4d7 (diff)
add image url to String output
Diffstat (limited to 'internal')
-rw-r--r--internal/platforms/linkedin/preview.go3
1 files changed, 3 insertions, 0 deletions
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)
}