Welcome to the first Boston Go language lab! We are going to build a chat server in Go, then chat with each other!
The goal is to practice implementing some of the concurrency primitives we learned in the previous meetup, and get your hands dirty by writing some real Go code.
- PLEASE BRING: A laptop with a Go language environment with Go 1.4 already set up. Please see 'Vagrant setup' below to get started with one easily.
- If you are having trouble setting up your Go programming environment, please join the #lab-help channel in the Boston Golang Slack group. You can signup for the Slack group here.
- PLEASE BRING: A text editor or IDE suitable for writing Go code.
- For beginners, Sublime is a good option. Make sure you install the Go plugin here.
- For VIM users, there is a pretty nice VIM setup here.
- PLEASE HAVE: Some basic Go language exposure. You should be familiar with the Go basics: e.g., Go's types, structs, control flow structures, goroutines, and channels.
Other programming language experience and concepts (such as networking, etc) will be helpful. A good introduction to the basics of Go for people familiar with other programming language is available at: https://tour.golang.org. If you can get through this tour, you will be well-prepared for this meetup!
-
Fork this repository in Github.
-
Clone the repository into a directory
# open a terminal window and type:
$ git clone https://github.com/bostongolang/golang-lab-chat.git
- Install Vagrant for your platform.
- Open a terminal window, and cd /path/to/this/repository.
# open a terminal window and type:
$ cd golang-lab-chat
- From within the
golang-lab-chat
directory, typevagrant up
. This will create a virtual machine with Ubuntu linux and Go 1.4 installed for the Vagrant user. - Type
vagrant ssh
to ssh into the virtual machine.
Within the virtual machine, golang-lab-chat
on the host computer
will be mapped to /opt/golang-lab-chat in the guest. So any changes
you make in the normal filesystem should be reflected in the VM!
Need help? Arrive a little early and we can help you get up-and-running, or join the Boston Golang Slack group #lab-help channel group by signing up here.
You can also email me directly: [email protected].
This lab is organized into the following steps -- if you ever need to 'cheat' and see an example of how the code is implemented, we have provided working code examples for each section.