diff options
author | bogem <[email protected]> | 2016-11-18 22:54:57 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-11-22 23:43:55 +0100 |
commit | dec1706ae0439bc6241332c6c9e7e6a818a203f0 (patch) | |
tree | 648cc18cfdef629c87d389bcd37601355dd77bb2 /parser/frontmatter.go | |
parent | 1f130fd69247aa3ae2e08560cd56537b32ef3d80 (diff) | |
download | hugo-dec1706ae0439bc6241332c6c9e7e6a818a203f0.tar.gz hugo-dec1706ae0439bc6241332c6c9e7e6a818a203f0.zip |
commands, hugolib, parser, tpl: Use errors.New instead of fmt.Errorf
Diffstat (limited to 'parser/frontmatter.go')
-rw-r--r-- | parser/frontmatter.go | 10 |
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") } } |