environment

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DockumentHomeEnvVar location of Dockument configuration file
	DockumentHomeEnvVar = "DOCKUMENT_HOME"
)

Variables

View Source
var DefaultDockumentHome = filepath.Join(homedir.HomeDir(), ".dockument")

DefaultDockumentHome is the default DOCKUMENT_HOME.

View Source
var DefaultOutPath, _ = os.Getwd()

DefaultOutPath is the default value for

View Source
var EnvMap = map[string]string{
	"home": "DOCKUMENT_PATH",
}

EnvMap maps flag names to envvars

Functions

This section is empty.

Types

type EnvSettings

type EnvSettings struct {
	// Home is the local path to the dockument home directory.
	Home    path.Home
	Outpath string
}

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