refactor: use caption var only once
This commit is contained in:
parent
1d07904459
commit
a78d9df545
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user