aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/tj/front/front.go
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2018-10-19 06:58:02 -0700
committerChristine Dodrill <me@christine.website>2018-10-19 06:58:35 -0700
commitd2ff4407993e4511e0225c12964bc07cd8d02be6 (patch)
tree1ca621c635b568054bf8808306cf4b6baa9cfedf /vendor/github.com/tj/front/front.go
parentf363c7e7eb6ca43e92624365ceab66a78d99b376 (diff)
downloadxesite-d2ff4407993e4511e0225c12964bc07cd8d02be6.tar.xz
xesite-d2ff4407993e4511e0225c12964bc07cd8d02be6.zip
use GOPROXY
Diffstat (limited to 'vendor/github.com/tj/front/front.go')
-rw-r--r--vendor/github.com/tj/front/front.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/vendor/github.com/tj/front/front.go b/vendor/github.com/tj/front/front.go
deleted file mode 100644
index e0382b5..0000000
--- a/vendor/github.com/tj/front/front.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Package front provides YAML frontmatter unmarshalling.
-package front
-
-import (
- "bytes"
-
- "gopkg.in/yaml.v1"
-)
-
-// Delimiter.
-var delim = []byte("---")
-
-// Unmarshal parses YAML frontmatter and returns the content. When no
-// frontmatter delimiters are present the original content is returned.
-func Unmarshal(b []byte, v interface{}) (content []byte, err error) {
- if !bytes.HasPrefix(b, delim) {
- return b, nil
- }
-
- parts := bytes.SplitN(b, delim, 3)
- content = parts[2]
- err = yaml.Unmarshal(parts[1], v)
- return
-}