Chapter 4 - Packages
Exercise 1: Importing Packages
We’ve set up a Go package at
What command would you run in your terminal to download and install this package in your Go workspace?
Once you’ve installed the package, you’ll have the following files in your workspace:
Write a program that imports all the above packages and calls all the functions they contain. You can include the program in your Go workspace, if you like, or just store it anywhere and run it with
The program output should look like this:
Opening door Shining headlights Playing music Bwomp bwamp BWOOOOMP Turning front wheels Peeling out!
When you’re ready, have a look at the solution.