refactor: use caption var only once

This commit is contained in:
decentral1se 2022-02-05 15:10:23 +01:00
parent 1d07904459
commit a78d9df545
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410

View File

@ -542,7 +542,6 @@ func trimFinalNewline(contents []byte) string {
// return value.
func getHref(c *cli.Context, fpath string, mtype string) (bool, string, error) {
var href string
var caption string
var unknown bool
fname := filepath.Base(fpath)
@ -559,7 +558,7 @@ func getHref(c *cli.Context, fpath string, mtype string) (bool, string, error) {
href = fmt.Sprintf("<pre>%s</pre>", trimFinalNewline(fcontents))
}
} else if ftype == "image" {
caption = ""
var caption string
exifCaption, err := getCaption(c, fpath)
if err != nil {