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

loader

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOverlayExtendsPath

func GetOverlayExtendsPath(o *overlay.Overlay) (string, error)

GetOverlayExtendsPath returns the path to file if the extends URL is a file URL. Otherwise, returns an empty string and an error. The error may occur if no extends URL is present or if the URL is not a file URL or if the URL is malformed.

func LoadEitherSpecification

func LoadEitherSpecification(path string, o *overlay.Overlay) (*yaml.Node, string, error)

LoadEitherSpecification is a convenience function that will load a specification from the given file path if it is non-empty. Otherwise, it will attempt to load the path from the overlay's extends URL. Also returns the name of the file loaded.

func LoadExtendsSpecification

func LoadExtendsSpecification(o *overlay.Overlay) (*yaml.Node, error)

LoadExtendsSpecification will load and parse a YAML or JSON file as specified in the extends parameter of the overlay. Currently, this only supports file URLs.

func LoadOverlay

func LoadOverlay(path string) (*overlay.Overlay, error)

LoadOverlay is a tool for loading and parsing an overlay file from the file system.

func LoadOverlayFromReader added in v1.18.0

func LoadOverlayFromReader(r io.Reader) (*overlay.Overlay, error)

LoadOverlayFromReader parses an overlay from the given reader.

func LoadSpecification

func LoadSpecification(path string) (*yaml.Node, error)

LoadSpecification will load and parse a YAML or JSON file from the given path.

func LoadSpecificationFromReader added in v1.18.0

func LoadSpecificationFromReader(r io.Reader) (*yaml.Node, error)

LoadSpecificationFromReader parses a YAML or JSON specification from the given reader.

Types

This section is empty.

Jump to

Keyboard shortcuts

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