yaml

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

extended yaml library and supported #include syntax.

you can decode and encode with #include <dir> format in yaml file, if the dir is relative, it will change the dir to relative from this file.

each file that is expanded will add n space char before each line, the n count is the number before #include in each #include line.

you can nested 10 layers by #include tag.

the Render function will expand each #include tag, and replace each relative path to absolute path, the returned string is the result of the final yaml data string.

Index

Constants

This section is empty.

Variables

View Source
var ErrNested = errors.New("nested hierarchy is too high")

ErrNested nested more than 10 times

Functions

func Decode

func Decode(dir string, out interface{}) error

Decode decode yaml file with include

func Render

func Render(dir string) (string, error)

Render render yaml file with include

Types

This section is empty.

Jump to

Keyboard shortcuts

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