Help us shape the future of Go! Take the 2026 Go Developer Survey

yamldoc

package
v0.6.0 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: 10 Imported by: 0

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