multifile

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package multifile combines multiple fs.File instances into one logical file.

This is used in the configuration parsing subsystem to load multiple logical bot rules files as one composite yaml file.

See function YAMLList for more information.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCantOpen  = errors.New("multifile: can't open")
	ErrCantStat  = errors.New("multifile: can't stat")
	ErrCantClose = errors.New("multifile: can't close")
)

Functions

func YAMLList

func YAMLList(fsys fs.FS, fnames []string) (fs.File, error)

YAMLList opens multiple files from the given filesystem and gloms them together into one big YAML reader where each component file is its own YAML document.

This works because the import logic calls yaml decoding in a loop, making sure that every YAML document is decoded until the file runs out of data.

Make sure to call yaml decoding in a loop until this file returns io.EOF.

Types

This section is empty.

Jump to

Keyboard shortcuts

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