aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/Xe/ln
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2017-05-20 23:30:47 -0700
committerGitHub <noreply@github.com>2017-05-20 23:30:47 -0700
commit55f50910d96b94658b8d9d6bcaa09be5cc90bc05 (patch)
tree07112ff8f7d2a67dbb5f99652181d4e205f877cb /vendor/github.com/Xe/ln
parent372573572913bebe24312b72f2c62d74bb8aba54 (diff)
parente8f967619e02ebdd6daa5132012ea2382f34ce91 (diff)
downloadxesite-55f50910d96b94658b8d9d6bcaa09be5cc90bc05.tar.xz
xesite-55f50910d96b94658b8d9d6bcaa09be5cc90bc05.zip
Merge pull request #4 from Xe/Xe/feat/server-side-rendering
Use server-side rendering, redo frontend with hack.css
Diffstat (limited to 'vendor/github.com/Xe/ln')
-rw-r--r--vendor/github.com/Xe/ln/formatter.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/vendor/github.com/Xe/ln/formatter.go b/vendor/github.com/Xe/ln/formatter.go
index 9d67139..ecd4743 100644
--- a/vendor/github.com/Xe/ln/formatter.go
+++ b/vendor/github.com/Xe/ln/formatter.go
@@ -43,7 +43,17 @@ func (t *TextFormatter) Format(e Event) ([]byte, error) {
writer.WriteString(e.Time.Format(t.TimeFormat))
writer.WriteString("\"")
- for k, v := range e.Data {
+ keys := make([]string, len(e.Data))
+ i := 0
+
+ for k := range e.Data {
+ keys[i] = k
+ i++
+ }
+
+ for _, k := range keys {
+ v := e.Data[k]
+
writer.WriteByte(' ')
if shouldQuote(k) {
writer.WriteString(fmt.Sprintf("%q", k))