maps

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromSlice

func FromSlice(slice []string) map[string]any

FromSlice converts a slice of dot-delimited string values into a map[string]any. For example: "a.b.c=123","a.b.d=124" would return { "a": { "b": { "c": 123, "d": 124 } } }

func FromYAMLFile

func FromYAMLFile(path string) (map[string]any, error)

FromYAMLFile converts a yaml file into a map[string]any.

func Merge

func Merge(base, override map[string]any)

Merge merges the override map into the base map. Modifying the base map in place.

func ToYAML

func ToYAML(m map[string]any) (string, error)

ToYAML converts the m map into a yaml string. E.g. map[string]any{"a" : 1, "b", 2} becomes a: 1 b: 2

Types

This section is empty.

Jump to

Keyboard shortcuts

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