Building Web Applications with Go
Welcome, gopher! You're not a gopher? Well, this workshop is for gophers, or people that use the Go programming language. But fear not if you've never written any Go before! I'd recommend you learn the basics for the language first with the Go tour.
This workshop has been run a couple of times with an instructor leading. The goal of this repo is to make it as easy as possible for individuals to follow the content by themselves. If you get stuck at any point, feel free to file issues asking questions.
Setting up your workspace
To go through this you will need the following:
- You have installed the Go Programming Language.
- You have set up a
GOPATH
by following the How to Write Go Code tutorial. - You are somewhat familiar with the basics of Go. (The Go Tour is a pretty good place to start)
- You have a Google account and you have installed the Google Cloud SDK.
Contents
There's a lot to say about how to build web applications, in Go or any other language. But we only have one day so we won't try to cover too much. Instead we'll cover the basics, so you'll be able to explore other solutions and frameworks later.
The workshops is divided in eleven sections:
- 0: Hello world
- 1: Web Clients
- 2: Web servers
- 3: Input validation and status codes
- 4: Deploying to App Engine
- 5: Hello, HTML
- 6: JSON encoding and decoding
- 7: Durable storage with Cloud Datastore
- 8: Retrieving remote resources with urlfetch
- 9: What is Memcache and how to use it from App Engine
- 10: Congratulations!
Resources
These are places where you can find more information for Go:
- golang.org
- godoc.org, where you can find the documentation for any package.
- The Go Programming Language Blog
My favorite aspect of Go is its community, and you are now part of it too. Welcome!
As a newcomer to the Go community you might have questions or get blocked at some point. This is completely normal, and we're here to help you. Some of the places where gophers tend to hang out are:
- The Go Forum
- #go-nuts IRC channel at Freenode
- Gophersβ community on Slack (signup here for an account).
- @golang and #golang on Twitter.
- Go+ community on Google Plus.
- Go user meetups
- golang-nuts mailing list
- Go community Wiki
Disclaimer
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.