From bdadec0bbe2b4cce25bd48399fdfc96b4c06bfa5 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 5 Feb 2022 15:33:30 +0100 Subject: [PATCH] refactor: use empty caption from function call --- distribusi.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/distribusi.go b/distribusi.go index 4061ce5..a84799c 100644 --- a/distribusi.go +++ b/distribusi.go @@ -558,17 +558,11 @@ func getHref(c *cli.Context, fpath string, mtype string) (bool, string, error) { href = fmt.Sprintf("
%s
", trimFinalNewline(fcontents)) } } else if ftype == "image" { - var caption string - - exifCaption, err := getCaption(c, fpath) + caption, err := getCaption(c, fpath) if err != nil { return unknown, href, nil } - if exifCaption != "" { - caption = exifCaption - } - if stype == "gif" { href = fmt.Sprintf("
%s
", fname, stype, fname, caption) } else {