yamldoc

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 10 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

Package yamldoc reads the one YAML document of a permission list, and source lines out of YAML errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Document

func Document(path string, data []byte) (yaml.Node, error)

Document returns the YAML document of the permission list data read from path, or an empty node when data holds none. It refuses with E-MAN-003 at path:line data that is not valid YAML, that holds more than one document, or that uses an anchor, an alias or a merge key, which it reports on every line that holds one. Its error unwraps, with Unwrap() []error, to the coded errors.

func Line

func Line(err error) (int, bool)

Line returns the first line number a YAML error mentions.

func LineOr1

func LineOr1(err error) int

LineOr1 returns the first line number a YAML error mentions, or 1 when it mentions none.

Types

This section is empty.

Jump to

Keyboard shortcuts

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