envvar

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 3 Imported by: 0

README

go-envvar

Opnionated utility package for handling environment variables, based on brendanstennett/envvar


Build GoDoc

Example config.yml


Usage

func init() {
    envvar.Load("../config.yaml", os.Getenv("APP_ENV"))
    // if no environment argument is passed, it defaults to `local`
}

Documentation

Overview

Package envvar provides an opnionated way of handling environment variables as yaml files see https://github.com/drish/go-envvar/blob/master/example.yml for an example config

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(path, env string)

Load configuration file from path, exits if can't load

func Parse

func Parse(c interface{})

Parse checks for the presence of env vars and sets them when necessary TODO: load current env

Types

This section is empty.

Jump to

Keyboard shortcuts

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