yamlnode

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 2 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 yamlnode reads the nodes of a parsed workflow and tells the lines of the files it was read from.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HoldsAnchor

func HoldsAnchor(n ast.Node) bool

HoldsAnchor reports whether n defines an anchor at any depth, as a key a workflow does not take may hold one for the files read after it.

func Items

func Items(n ast.Node) []ast.Node

func LineOf

func LineOf(n ast.Node) int

func Pairs

func Pairs(n ast.Node) []*ast.MappingValueNode

Pairs returns the keys and values of n, a mapping, which a mapping of one key is parsed as on its own; nil when n is not a mapping.

Types

type FileStart

type FileStart struct {
	Name string
	Line int
}

FileStart is a file of a workflow and the line of the source it starts on.

type Files

type Files []FileStart

Files are the files of a workflow, each with the line of the source it starts on, in that order.

func MapFiles

func MapFiles(files []string, data [][]byte) Files

MapFiles returns the line each of files starts on in the text read, the files one after another, so that a line of the text can be told as a line of a file, whose contents are data. workflowfile.Read adds a newline after a file that does not end in one, unless it is the last.

func (Files) At

func (fl Files) At(line int) (string, int)

At tells line, a line of the source, as a file and a line of it.

type VisitorFunc

type VisitorFunc func(ast.Node) bool

func (VisitorFunc) Visit

func (f VisitorFunc) Visit(n ast.Node) ast.Visitor

Jump to

Keyboard shortcuts

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