env

package module
v0.0.0-...-87ee7d1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 7 Imported by: 0

README

with-env

Written as a counterpart to pjs, provides a godotenv wrapper for resolving a single env file out of a directory of many based on aliases in the file comments.

For example adding the comment # with-env aliases: sandbox would cause with-env to select this file with if provided the input sandbox.

Supports multiple aliases per file, eq: # with-env aliases: dev,develop.

Leverages godotenv for some functionality while mimicking other non-exported functionality.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OverloadOption = option{
	// contains filtered or unexported fields
}

Functions

func LoadFrom

func LoadFrom(afs afero.Fs, abs, alias string, options ...Option) error

LoadFrom is a somewhat lazy wrapper around one or more hcl index files and godotenv. It leverages godotenv.Parse and simulates behavior to godotenv.Load/godotenv.Overload

Types

type Option

type Option interface {
	Type() string
}

func NewPrintOnlyOption

func NewPrintOnlyOption(out io.Writer) Option

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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