conf

package
v0.0.0-...-9da1c94 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeMaps

func MergeMaps(ms ...map[string]string) map[string]string

MergeMaps merge two or more maps the latter map overrides the former if duplicate keys exist across the two maps

func ReplaceVar

func ReplaceVar(text string, conf Configuration) string

ReplaceVar recursively replaces any variables in the text string using values provided by the config source

Types

type Configuration

type Configuration interface {
	Get(key string) string
	Set(key, value string)
	Merge(s Configuration)
	MergeMap(m map[string]string)
	Append(m map[string]string) Configuration
	Vars() map[string]string
	Replace()
	Slice() []string
	String() string
}

Configuration represent a source of environment variables

Jump to

Keyboard shortcuts

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