plugin

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 0 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 plugin provides official YAML plugins for go-yaml.

Plugins extend the core YAML library with optional processing capabilities. This package contains official plugin implementations maintained by the go-yaml project.

Available Plugins

Limit plugin (plugin/limit):

  • Configurable depth and alias expansion limits

Tab indentation plugin (plugin/tabindent):

  • Tab-aware structural indentation for loading and dumping

Usage

Import the plugin you need and register it with WithPlugin:

import "github.com/pb33f/go-yaml"
import "github.com/pb33f/go-yaml/plugin/limit"

// Disable alias checking for documents with many aliases
loader := yaml.NewLoader(data, yaml.WithPlugin(limit.New(limit.AliasNone())))

Third-Party Plugins

Plugin interfaces use public types and can be implemented by external packages. Implement the relevant plugin interface (e.g., LimitPlugin) and register with WithPlugin.

Directories

Path Synopsis
Package limit provides a configurable safety limit plugin for go-yaml.
Package limit provides a configurable safety limit plugin for go-yaml.
Package tabindent configures structural YAML indentation.
Package tabindent configures structural YAML indentation.

Jump to

Keyboard shortcuts

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