2. Who Am I?
4th Year CS Student at Macewan University
Started learning Go professionally with no prior experience
Used it for a web-development job under Bellstone Engineering
3. Focus of the talk
Features of Golang
Struggles learning it in a professional setting
What I wish I would have known if I could go back and start again
4. Setup
Sublime + GoSublime
Start with C (Pointers will make more sense)
5. Godoc
1
Go documentation is easily found
2
Documentation > Stack Overflow(for the
most part)
3
https://godoc.org/github.com/gorilla/mux
7. Syntax
var myVar bool
No semicolons
Enforced if/else syntax
:= assignment syntax
8. Functions and Returns
Functions have similar syntax to regular declaration
func (r receiver) funcName (parameters) (return)
Can return multiple things at once
9. Structs, Slices, Objects(ish)
There are no objects in Go
Frankenstein your own with method calls
Slices are like arrays, but faster
Maps exist in go
16. Time Package
Weird at first but versatile once you get the hang of it
Most important date, Mon Jan 2 15:04:05 -0700 MST 2006 (Parse into this)
17. Database/sql
Really easy to connect to any DB(PostGres, mssql, sqlite)
Just need the specific driver (for us its lib/pq)
Last months talk was all on DB’s in GO
Great encapsulation
18. Testing/Logging
Go has a very flushed out testing suite
You can nest tests
Go test –v shows you the hierarchy
Structured logging for machine readable
logs
Package github.com/aybabtme/log
This was discussed in the July meetup
Testing Logging
19. Gorilla Mux
Fleshed out router for go
Makes grabbing parameters from URL super simple