config

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: BlueOak-1.0.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data(settings map[string]string) []byte

Data generates a config []byte data from a settings map.

func Mapify added in v0.5.0

func Mapify(obj interface{}) (map[string]string, error)

Mapify takes an interface with ini tags, and parses it into a settings map. obj must be a pointer to a struct.

func Parse

func Parse(cfgPathOrData interface{}) (map[string]string, error)

Parse returns a collection of all key-value options in the provided config file path or []byte data.

func ParseInto

func ParseInto(cfgPathOrData, obj interface{}) error

ParseInto parses config options from the provided config file path or []byte data into the specified interface.

func Unmapify

func Unmapify(settings map[string]string, obj interface{}) error

Unmapify parses config options from the provided settings map into the specified interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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