golang tutorial - Golang Env Variable | Golang Var | Environment Variables In Golang - golang - go programming language - google go - go language - go program - google language
Environmental Variables In Golang
- Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.
- They are part of the environment in which a process runs.
- For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process.
- Examples of environment variables include:
- PATH - a list of directory paths.
- HOME (Unix-like) and USERPROFILE (Microsoft Windows) - indicate where a user's home directory is located in the file system.
- HOME/{.AppName} (Unix-like) and APPDATA\{DeveloperName\AppName} (Microsoft Windows) - for storing application settings.
- LOCALAPPDATA or PROGRAMDATA (shared between users) is used.
- TERM (Unix-like) - specifies the type of computer terminal or terminal emulator being used
- PS1 (Unix-like) - specifies how the prompt is displayed in the Bourne shell and variants.
- MAIL (Unix-like) - used to indicate where a user's mail is to be found.
- TEMP - location where processes can store temporary files