Homework 0

Homework 0: Hello Go!

Task

Install Go, be familiar with the toolchain, and become familiar writing Go programs and running them on your machine.

Installing Go

First, you should install Go onto your machine with the instructions provided at the Go website. Be sure to follow the instructions under the Test your installation header, particularly setting your GOPATH.

Once you are done, you should be able to create the hello.go program shown and run it on your personal machine.

For this class, we will be using Go >= 1.6. If you’re having difficulties installing Go on your machine, we suggest using a Linux virtual machine or using ENIAC to run your programs.

Editor Configuration

While this is not required, we highly recommend that you configure your editor environment for Go early on. There are numerous Go packages, for nearly every editor, including vim, emacs, Atom, VS Code, and Sublime.

These plugins will greatly increase your efficiency by automatically running gofmt, automatically including imports through goimports, and catching errors early.

Beginner Exercises

Once you have installed Go and configured your editor, you should complete the exercises in the hw0.go code file stub.

Be sure that your code is run through gofmt and compiles successfully before submitting. You will be learning many Go best practices throughout the semester that you will be expected to follow.

Submitting

You should submit your hw0.go to Canvas when you are done. The Canvas page is not up yet (as of January 16), this assignment will be updated as soon as the assignment is created.

NOTE: Please submit only the completed hw0.go file, nothing else.