Summary

Completed

Our goal in this module was to guide you through your first steps with Go. We described how to set up a working environment to create projects in Go. You used Visual Studio Code to write programs rapidly following the Go standards. By creating a typical Hello World! program, you learned how to compile and run programs written in Go.

Remember, all projects in Go share the same workspace on your computer. We recommend you create all your projects within the $GOPATH/src directory. But, there are times when you might need to create projects at a different location. In a later module, we'll describe how you can store your project code at a different location.

Finally, you learned the difference between the go build and go run commands. The go build command compiles the program and, if there are no errors, it generates a binary executable file that you can run without using Go. You ordinarily use this command to generate the application binaries that you'll use to deploy the application to a different environment. And the go run command compiles and executes the application without generating a binary. You'll use this command when you develop and test your application locally.