yaml

package
v0.0.0-...-0adad2b Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadYaml

func LoadYaml(path string, out interface{}) error

func Marshal

func Marshal(value interface{}) ([]byte, error)

func MarshalString

func MarshalString(value interface{}) (string, error)

func MustJSON

func MustJSON(value interface{}) string

func MustMarshalString

func MustMarshalString(value interface{}) string

MustMarshallString marshals the value to a string and panics if there is an error.

func MustYaml

func MustYaml(value interface{}) string

func SaveYaml

func SaveYaml(path string, value interface{}) error

func TryLoadYaml

func TryLoadYaml(path string, out interface{}) bool

TryLoadYaml tries to load something and returns false if it couldn't

func Unmarshal

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

func UnmarshalString

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

func Yamlize

func Yamlize(y string) string

Yamlize ensures that a string is valid YAML.

Types

type FromPathSetter

type FromPathSetter interface {
	SetFromPath(fp string)
}

Jump to

Keyboard shortcuts

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