cfgset

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPathSeparator  = "/"
	DefaultValueSeparator = ":"
)

Functions

func FlattenedToString

func FlattenedToString(flattened map[string]string) string

func RecursiveFlattenToMapWithSep

func RecursiveFlattenToMapWithSep(prefix string, v interface{}, sep string) map[string]string

Types

type MergeOptions

type MergeOptions struct {
	SourceFolder string
	Debug        bool
}

type MergeResult

type MergeResult struct {
	AppDir      string
	MergeBySlug map[string]map[string]interface{}
}

func Merge

func Merge(o MergeOptions) ([]MergeResult, error)

Merge merges a source folder of config files grouped by app assuming that each app folder contains a default.yaml and one or more slug.yaml (e.g. dev.yaml, prd.yaml, etc)

func (*MergeResult) FlattenToMap

func (r *MergeResult) FlattenToMap() map[string]string

func (*MergeResult) FlattenToMapWithSep

func (r *MergeResult) FlattenToMapWithSep(sep string) map[string]string

Jump to

Keyboard shortcuts

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