This workshop jumps through a lot of what is covered in the Go Tour. The exercises are new and match more along with the class content, and some pieces (like testing and APIs) are not covered in the Go Tour.
1. Graduating to Go
The Go Tour and Beyond in 2.5 Hours!
Kaylyn Gibilterra
Software Engineer, Capital One
Overly Enthusiastic About Go
@kgibilterra
2. Make a friend!
• Where are you from?
• What do you do?
• What technical experience do
you have (coding or not)
• Why are you interested in Go?
• Do you want to be Gopher
friends forever?
16. Exercise
• Declare 2 integers, 2 strings, and 2 booleans
• One should be set to it’s zero value and one
should be initialized to whatever you want
• Print out those variables
• Write a function that prints out all of these variables
https://play.golang.org/p/aRwLHoz0Nf
24. Exercise
• Write a function that imports the library “time” to check what time
it is now and print out if it falls inside the time of this conference,
the WIT Experience
• var day := time.Date(Year, Month, Day, Hour, Minute, Second,
Nanosecond, Timezone)
• var now := time.Now()
• in the Play environment, time is always set to:
2009-11-10 23:00:00 +0000 UTC m=+0.000000000
• Convert this into a while loop where the program continually
runs until it is WIT Experience time
https://play.golang.org/p/3BPc7f9ucZ
35. Exercise: Quicksort
1. Given an unsorted list:
2. Select a pivot number:
3. Put the pivot in the correct position for the sorted array
with all smaller elements before it, and all greater
elements after:
4. Recursively continue on the smaller and greater halves of
the list:
3 5 2 1 6 4
3 5 2 1 6 4
3 2 1 4 6 5
3 2 1 6 54
https://play.golang.org/p/tk4si__CyW
55. Go Tour - https://tour.golang.org
Books
• Go in Action
• The Go Programming Language
Online Resources
• Go By Example
• Effective Go
• The Go Language Spec
Code
• github.com/golang/go
• github.com/ardanlabs/gotraining
Blogs / Podcasts
• The Go Blog
• Gopher Academy
• Go Time
Gopher Slack - https://invite.slack.golangbridge.org/ #ghc2017
Gopher Resources