config

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 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 any) (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 any) (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 any) 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 any) 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