add missing string variable in log statement in export.go + go fmt
This commit is contained in:
parent
b6da5d9711
commit
3986c8eec1
|
@ -14,9 +14,10 @@ import (
|
||||||
"archive/zip"
|
"archive/zip"
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/csv"
|
"encoding/csv"
|
||||||
"github.com/writeas/web-core/log"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/writeas/web-core/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func exportPostsCSV(u *User, posts *[]PublicPost) []byte {
|
func exportPostsCSV(u *User, posts *[]PublicPost) []byte {
|
||||||
|
@ -37,7 +38,7 @@ func exportPostsCSV(u *User, posts *[]PublicPost) []byte {
|
||||||
w := csv.NewWriter(&b)
|
w := csv.NewWriter(&b)
|
||||||
w.WriteAll(r) // calls Flush internally
|
w.WriteAll(r) // calls Flush internally
|
||||||
if err := w.Error(); err != nil {
|
if err := w.Error(); err != nil {
|
||||||
log.Info("error writing csv:", err)
|
log.Info("error writing csv: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return b.Bytes()
|
return b.Bytes()
|
||||||
|
|
Loading…
Reference in New Issue