Esempio n. 1
0
File: utils.go Progetto: get3w/get3w
func (parser *Parser) read(frontmatter interface{}, key ...string) ([]byte, []byte) {
	data, _ := parser.readAll(key...)
	front, remaining := fmatter.ReadRaw(data)
	if len(front) > 0 {
		yaml.Unmarshal(front, frontmatter)
	}
	return front, remaining
}
Esempio n. 2
0
File: utils.go Progetto: get3w/get3w
func (parser *Parser) readRemaining(key ...string) []byte {
	data, _ := parser.readAll(key...)
	_, remaining := fmatter.ReadRaw(data)
	return remaining
}