frontmatter

package
v1.171.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 WithEnd

func WithEnd(end string) FormatOption

WithEnd sets the closing delimiter.

func WithRequiresNewLine

func WithRequiresNewLine() FormatOption

WithRequiresNewLine requires an empty line after the closing delimiter.

func WithStart

func WithStart(start string) FormatOption

WithStart sets the opening 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL