yamlutil

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(i interface{}) interface{}

Convert converts an map[interface{}] to map[string] type

func ReadYamlFromFile

func ReadYamlFromFile(filePath string, yamlTarget interface{}) error

ReadYamlFromFile reads a yaml file

func ToInterfaceMap

func ToInterfaceMap(yamlData interface{}) (map[string]interface{}, error)

ToInterfaceMap converts to yaml and back to generate map[string]interface{}

func Unmarshal

func Unmarshal(data []byte, out interface{}) error

Unmarshal decodes the given byte into an object and returns a prettified string

func UnmarshalStrict

func UnmarshalStrict(data []byte, out interface{}) error

func UnmarshalStrictJSON

func UnmarshalStrictJSON(data []byte, out interface{}) error

func UnmarshalString

func UnmarshalString(data string, out interface{}) error

UnmarshalString decodes the given string into an object and returns a prettified string

func WriteYamlToFile

func WriteYamlToFile(yamlData interface{}, filePath string) error

WriteYamlToFile formats yamlData and writes it to a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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