aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser/frontmatter.go
diff options
context:
space:
mode:
Diffstat (limited to 'parser/frontmatter.go')
-rw-r--r--parser/frontmatter.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/parser/frontmatter.go b/parser/frontmatter.go
index 0f112ecfa..ed25c08e1 100644
--- a/parser/frontmatter.go
+++ b/parser/frontmatter.go
@@ -16,7 +16,7 @@ package parser
import (
"bytes"
"encoding/json"
- "fmt"
+ "errors"
"strings"
toml "github.com/pelletier/go-toml"
@@ -32,7 +32,7 @@ type frontmatterType struct {
func InterfaceToConfig(in interface{}, mark rune) ([]byte, error) {
if in == nil {
- return []byte{}, fmt.Errorf("input was nil")
+ return []byte{}, errors.New("input was nil")
}
b := new(bytes.Buffer)
@@ -64,13 +64,13 @@ func InterfaceToConfig(in interface{}, mark rune) ([]byte, error) {
}
return b.Bytes(), nil
default:
- return nil, fmt.Errorf("Unsupported Format provided")
+ return nil, errors.New("Unsupported Format provided")
}
}
func InterfaceToFrontMatter(in interface{}, mark rune) ([]byte, error) {
if in == nil {
- return []byte{}, fmt.Errorf("input was nil")
+ return []byte{}, errors.New("input was nil")
}
b := new(bytes.Buffer)
@@ -116,7 +116,7 @@ func InterfaceToFrontMatter(in interface{}, mark rune) ([]byte, error) {
}
return b.Bytes(), nil
default:
- return nil, fmt.Errorf("Unsupported Format provided")
+ return nil, errors.New("Unsupported Format provided")
}
}