diff options
| author | Christine Dodrill <me@christine.website> | 2018-10-19 06:58:02 -0700 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2018-10-19 06:58:35 -0700 |
| commit | d2ff4407993e4511e0225c12964bc07cd8d02be6 (patch) | |
| tree | 1ca621c635b568054bf8808306cf4b6baa9cfedf /vendor/github.com/tj/front | |
| parent | f363c7e7eb6ca43e92624365ceab66a78d99b376 (diff) | |
| download | xesite-d2ff4407993e4511e0225c12964bc07cd8d02be6.tar.xz xesite-d2ff4407993e4511e0225c12964bc07cd8d02be6.zip | |
use GOPROXY
Diffstat (limited to 'vendor/github.com/tj/front')
| -rw-r--r-- | vendor/github.com/tj/front/Readme.md | 16 | ||||
| -rw-r--r-- | vendor/github.com/tj/front/front.go | 24 |
2 files changed, 0 insertions, 40 deletions
diff --git a/vendor/github.com/tj/front/Readme.md b/vendor/github.com/tj/front/Readme.md deleted file mode 100644 index 6789165..0000000 --- a/vendor/github.com/tj/front/Readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# Front - -Frontmatter unmarshaller, couldn't find one without a weird API. - -## Badges - -[](https://godoc.org/github.com/tj/front) - - -[](https://apex.sh/ping/) - ---- - -> [tjholowaychuk.com](http://tjholowaychuk.com) · -> GitHub [@tj](https://github.com/tj) · -> Twitter [@tjholowaychuk](https://twitter.com/tjholowaychuk) 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 -} |
