Пример #1
0
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
}
Пример #2
0
func (parser *Parser) readRemaining(key ...string) []byte {
	data, _ := parser.readAll(key...)
	_, remaining := fmatter.ReadRaw(data)
	return remaining
}