
上QQ阅读APP看书,第一时间看更新
Interacting with the Environment
In this chapter, the following recipes are covered:
- Retrieving the Golang version
- Accessing program arguments
- Creating a program interface with the flag package
- Getting and setting environment variables with default values
- Retrieving the current working directory
- Getting the current process PID
- Handling operating system signals
- Calling an external process
- Retrieving child process information
- Reading/writing from the child process
- Shutting down the application gracefully
- File configuration with functional options