yaml_loader

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadYamlBytes

func LoadYamlBytes(yamlBytes []byte, retObjects *[]any) error

LoadYamlBytes 加载YAML文件字节,一个文件中可以有多个YAML对象 参数: yamlBytes: YAML文件的字节 retObjects: 用来接收YAML对象的指针或者map的slice 返回值: 错误

func LoadYamlFile

func LoadYamlFile(yamlFilePath string, retObjects *[]any) error

LoadYamlFile 加载YAML文件,一个文件中可以有多个YAML对象 参数: yamlFilePath: YAML文件路径 retObjects: 用来接收YAML对象的指针或者map的slice 返回值: 错误

func LoadYamlMapBytes added in v1.5.0

func LoadYamlMapBytes(yamlBytes []byte, callback LoadMapCallback) error

LoadYamlMapBytes 加载YAML文件字节,一个文件中可以有多个YAML对象,顶级不能是YAML数组 参数: yamlBytes: YAML文件的字节 callback: 回调函数 返回值: 错误

func LoadYamlMapFile added in v1.5.0

func LoadYamlMapFile(yamlFilePath string, callback LoadMapCallback) error

LoadYamlMapFile 加载YAML文件,一个文件中可以有多个YAML对象,顶级不能是YAML数组 参数: yamlFilePath: YAML文件路径 callback: 回调函数 返回值: 错误

Types

type LoadMapCallback added in v1.5.0

type LoadMapCallback func(objectMap map[string]any) error

Jump to

Keyboard shortcuts

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