diff options
| author | Paul Buetow <paul@buetow.org> | 2024-11-07 09:21:23 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-11-07 09:21:23 +0200 |
| commit | e9142b9d7a2faf5c7dc5b13a621d3a216bce8e54 (patch) | |
| tree | cd555a8d0d061889c2ad283e5fec20da9b63db91 /internal | |
| parent | 2a458a132244c36217acfd4fb718d9250ff1e4d7 (diff) | |
add image url to String output
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/platforms/linkedin/preview.go | 3 |
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) } |
