aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/dump.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/dump.go')
-rw-r--r--cmd/dump.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index 281b7d6..a0deba7 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -21,6 +21,7 @@ import (
"fmt"
"log"
"bytes"
+ "strings"
"text/template"
"vidhukant.com/guestbook/db"
@@ -58,6 +59,7 @@ var dumpCmd = &cobra.Command{
if err := rows.Scan(&entry.Name, &entry.Website, &entry.Message); err != nil {
log.Fatal(err)
}
+ entry.Message = strings.Replace(entry.Message, "\n", "<br>", -1)
entries = append(entries, entry)
}
if rows.Err() != nil {