The Go CLI Playbook
What you'll learn
In this project, you will learn how to use the Go command line interface.
You will get to know how to:
- print environment information
- format source code
- get and install packages
- import missing packages
- run commands on existing source code
Table of contents
- Set up your local environment for this project. We'll walk you through everything you need to know, including how to install and configure your environment to be able to complete all of the tasks.
- This module will provide information about retrieving the environment information in go. Then you can examining the go environment manually or through a tool like grep.
- This module teaches how to use the format sub-command and the standalone program to format Go programs. It also touches a bit on the design decisions for formatting of Go programs.
- This module will teach you how to use go get to download and install packages. We will learn the go get command and what needs to be provided to it.
- This module will teach you how to use go install to compile and install packages. We will learn the go install command and what needs to be provided to it.
- This module focuses on the use of the standalone program called goimports, which is used to import missing packages.
- This module will teach you how to use go doc to prints the documentation for a function Similarly, the command can be used to print the documentation for a package, a variable, or a method.
- This module will teach you how to use go generate to scan for directives, run commands, and modify existing *.go source files.