// GetDefaultEnv returns the environment variables for the container.
// It will checn the HTTPProxy and HostEnv booleans and add the appropriate
// environment variables to the container.
GetDefaultEnv returns the environment variables for the container.
It will checn the HTTPProxy and HostEnv booleans and add the appropriate
environment variables to the container.
// GetDefaultEnv returns the environment variables for the container . // It will checn the HTTPProxy and HostEnv booleans and add the appropriate // environment variables to the container .
func (c *Config) GetDefaultEnv() []string {
	var env []string
	if c.Containers.EnvHost {
		env = append(env, os.Environ()...)
	} else if c.Containers.HTTPProxy {
		proxy := []string{"http_proxy", "https_proxy", "ftp_proxy", "no_proxy", "HTTP_PROXY", "HTTPS_PROXY", "FTP_PROXY", "NO_PROXY"}
		for _, p := range proxy {
			if val, ok := os.LookupEnv(p); ok {
				env = append(env, fmt.Sprintf("%s=%s", p, val))
			}
		}
	}
	return append(env, c.Containers.Env...)
}
func ( c * Config ) GetDefaultEnv ( ) [ ] string { var env [ ] string if c . Containers . EnvHost { env = append ( env , os . Environ ( ) ... ) } else if c . Containers . HTTPProxy { proxy := [ ] string { " " , " " , " " , " " , " " , " " , " " , " " } for _ , p := range proxy { if val , ok := os . LookupEnv ( p ) ; ok { env = append ( env , fmt . Sprintf ( " " , p , val ) ) } } } return append ( env , c . Containers . Env ... ) }
GetDefaultEnv returns the environment variables for the container.
GetDefaultEnv returns the environment variables for the container .