environment

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	//TaaSEnvVar location of Taas Configuration file
	TaaSEnvVar = "TAAS_HOME"

	//ComposeEnvVar output location for the compose command
	ComposeEnvVar = "COMPOSE_DIR"

	//DebugEnvVar debug environment variable
	DebugEnvVar = "TAAS_DEBUG"
)

Variables

View Source
var DefaultTaasHome = filepath.Join(homedir.HomeDir(), ".taas")

DefaultTaasHome is the default TAAS_HOME.

View Source
var EnvMap = map[string]string{
	"debug":   "TAAS_DEBUG",
	"home":    "TAAS_HOME",
	"compose": "COMPOSE_DIR",
}

EnvMap maps flag names to envvars

Functions

This section is empty.

Types

type EnvSettings

type EnvSettings struct {
	// Home is the local path to the taas home directory.
	Home taaspath.Home

	// Compose is the location of the compose file
	Compose string

	// Debug indicates whether or not taas is running in Debug mode.
	Debug bool
}

EnvSettings are the global environment settings

func (*EnvSettings) AddFlags

func (s *EnvSettings) AddFlags(fs *pflag.FlagSet)

AddFlags binds flags to the given flagset.

func (*EnvSettings) Init

func (s *EnvSettings) Init(fs *pflag.FlagSet)

Init sets values from the environment.

Jump to

Keyboard shortcuts

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