qsconfig

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathNotTranslatable = errors.New("provided invalid path cannot be translated into absolute path")
	ErrFileNotFound        = errors.New("specified file not found")
)

Functions

func LoadDotEnv

func LoadDotEnv(files ...string) error

Load environment variables from dotEnv (.env) files. Can pass in multiple files.

func LoadJson

func LoadJson(filename string, delim string) error

Load environment variables from JSON files.

func LoadYml

func LoadYml(filename string, delim string) error

Loads a YAML configuration file

Types

type ConfigType

type ConfigType[T interface{}] interface {
	Config() (T, error)
}

The template for config structs to implements

Jump to

Keyboard shortcuts

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