goyaml

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 23 Imported by: ? 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

Package goyaml adapts the SnakeYAML shared parser library to go-yaml.

Index

Constants

View Source
const Version = "0.1.0"

Version is both the adapter release and its required native library version.

Variables

This section is empty.

Functions

func Register

func Register() error

Register enables yaml-parser=snakeyaml without changing the native default. Registration performs no library loading or network requests. Call it during startup, before parsing configuration.

Types

type Option

type Option func(*Plugin)

Option configures a SnakeYAML parser.

func WithInstall

func WithInstall(enabled bool) Option

WithInstall controls downloading the pinned library when it is missing. Installation is enabled by default and never replaces an existing library.

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin implements yaml.ParserPlugin using the ABI v2 shared library. Its library is loaded on the first Parse call and stays loaded for its lifetime.

func New

func New(options ...Option) *Plugin

New creates a parser that locates its library through YAMLSTAR_LIBRARY_PATH or the standard plugin directories. Importing the package has no side effects.

func (*Plugin) Parse

func (p *Plugin) Parse(input []byte) ([]yaml.PluginEvent, error)

Parse returns a complete YAML event stream. Concurrent calls are supported.

Jump to

Keyboard shortcuts

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