envstruct

package module
v0.0.0-...-0c54aec Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: MIT Imports: 4 Imported by: 2

README

Golang Environment Struct Variable Applier

GoDoc

This package does apply if set the environment variable by a given name from the struct tag to the given struct. It also can handle nested structs

Example

A basic example is located here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyEnvVars

func ApplyEnvVars(c interface{}, prefix string) error

ApplyEnvVars overrides the values in the given struct recursively by the represent environment variable which is given in the struct tag 'env'. For nested structs the struct tag 'env' from the overlying struct will be added as a prefix. Currently it can handle the types: string, int, bool

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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