kind: Index | Files

package env

import ""


Package Files

homedir.go osarch.go term.go

func GetArch Uses

func GetArch() string

GetArch validates/returns the current architecture if supported and panics otherwise

func HomeDir Uses

func HomeDir() string

HomeDir returns the home directory for the current user. On Windows: 1. the first of %HOME%, %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% containing a `.kube\config` file is returned. 2. if none of those locations contain a `.kube\config` file, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned. 3. if none of those locations are writeable, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists is returned. 4. if none of those locations exists, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that is set is returned.

func IsTerminal Uses

func IsTerminal(w io.Writer) bool

IsTerminal returns true if the writer w is a terminal

Package env imports 6 packages (graph) and is imported by 2 packages. Updated 2019-09-25. Refresh now. Tools for package owners.