config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Db     dbConf
	Server serverConf
}

func AppConfig

func AppConfig() *Conf

AppConfig Setup and install the applications' configuration environment variables

Example
type exampleStruct struct {
	String string `env:"STRING"`
}
os.Setenv("STRING", "an example string!")

var e exampleStruct
err := envdecode.StrictDecode(&e)
if err != nil {
	panic(err)
}

// if STRING is set, e.String will contain its value
fmt.Println(e.String)
Output:

an example string!

Jump to

Keyboard shortcuts

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