From e3416a6181ae795823dfaed77b8e3cd365534a6a Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 21 Jan 2017 20:11:48 +0000 Subject: [PATCH] fix critical bug --- setup.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.go b/setup.go index c514b326..8e497a82 100644 --- a/setup.go +++ b/setup.go @@ -203,7 +203,14 @@ func getFrontMatter(conf *Config) string { log.Println(err) fmt.Printf("Can't get the default frontmatter from the configuration. %s will be used.\n", format) } else { - bytes = frontmatter.AppendRune(bytes, frontmatter.StringFormatToRune(format)) + r, err := frontmatter.StringFormatToRune(format) + if err != nil { + log.Println(err) + fmt.Printf("Can't get the default frontmatter from the configuration. %s will be used.\n", format) + return format + } + + bytes = frontmatter.AppendRune(bytes, r) f, err := frontmatter.Unmarshal(bytes) if err != nil {