backend engineering Have shipped production code with Java, Ruby, JavaScript and Go. Strong Interest in Computer languages Have been writing in Go for a year. @classyhacker on twitter 2
Language Index http://www.tiobe.com/tiobe-index/ The TIOBE programming language of the year award goes to the language with the biggest annual popularity 3
import path is a string that uniquely identifies a package import "fmt" //The main function in the main package is an entry point into the program func main() { fmt.Println("hello world") } Anatomy of Go hello world Namespace Dependencies Program entry point
creates statically-linked binaries by default. All Go binaries therefore include the Go run- time, along with the run-time type information necessary to support dynamic type checks, reflection, and even panic-time stack traces.” Q. Why is my trivial program such a large binary?
InfluxDb, Kubernetes, Hashicorp Fits in easily in a microservices architecture Server side and System engineering focus Networking companies are starting to adopt it What GO is good at and who is using it?
:=[3]int {1,2,3} b :=[2]int {1,2} a == b is False. Mismatched types [2]int and [3]int Map: No Generics support so get’s awkward at times a := map[string]int{“a”:1, “b”:2} Slices: Used everywhere for flexibility, SUPER IMPORTANT. Must Read Blog Post on Go Slices and Internal d := []byte{'h', 'e', 'l', ‘l'} d = append(d,'o') fmt.Printf(“%s",d) => hello
structs and interfaces. Generics: No Generics support. The built-in package has some helpers. Exceptions: Go does not have Exceptions so the error handling can be verbose. Dependency management: Does not provide a specific way to include a precise version of a library.
Go: Comprehensive online course resource exercism.io: Practice programming and get feedback Gopher Academy Blog Dave Cheney Blog gobyexample.com Ben Johnson Blog
personally use the following libs regularly Errors: https://github.com/pkg/errors Logs: https://github.com/sirupsen/logrus RESTful API’s: https://github.com/gorilla/mux