Browse Source

refactor: use caption var only once

decentral1se 2 years ago
parent
commit
a78d9df545
No known key found for this signature in database GPG Key ID: 3789458B3D0C410
  1. 3
      distribusi.go

3
distribusi.go

@ -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…
Cancel
Save