Documentation
¶
Overview ¶
- Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
- SPDX-License-Identifier: Apache-2.0
Package frontmatter preserves the existing front matter import path.
Deprecated: Use github.com/ARM-software/golang-utils/utils/serialisation/frontmatter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format = serialisation.Format
Format describes a front matter block.
func DefaultFormat ¶
func DefaultFormat() *Format
DefaultFormat returns a format with the package defaults.
func NewFormat ¶
func NewFormat(options ...FormatOption) *Format
NewFormat constructs a format from the supplied options.
type FormatOption ¶
type FormatOption = serialisation.FormatOption
FormatOption configures a front matter format.
func IncludeDelimitersWhenUnmarshalling ¶
func IncludeDelimitersWhenUnmarshalling() FormatOption
IncludeDelimitersWhenUnmarshalling includes the delimiters in the extracted content.
func WithRequiresNewLine ¶
func WithRequiresNewLine() FormatOption
WithRequiresNewLine requires an empty line after the closing delimiter.
type IFrontMatterParser ¶
type IFrontMatterParser = serialisation.IFrontMatterParser
IFrontMatterParser extracts front matter from a reader.
func NewParser ¶
func NewParser(formats ...*Format) (IFrontMatterParser, error)
NewParser creates a parser for the supplied formats.
func NewParserWithFormatOptions ¶
func NewParserWithFormatOptions(options ...FormatOption) (IFrontMatterParser, error)
NewParserWithFormatOptions creates a parser with the supplied format options.
type ParserOption ¶
type ParserOption = serialisation.ParserOption
ParserOption configures the front matter parser.
func WithBufferCapacity ¶
func WithBufferCapacity(capacity int) ParserOption
WithBufferCapacity configures the parser's buffer capacity.
type ParserOptions ¶
type ParserOptions = serialisation.ParserOptions
ParserOptions configures the front matter parser.
func DefaultParserOptions ¶
func DefaultParserOptions() *ParserOptions
DefaultParserOptions returns the default parser options.
func NewParserOptions ¶
func NewParserOptions(options ...ParserOption) *ParserOptions
NewParserOptions constructs parser options from the supplied options.