Go is a statically-typed, garbage-collected programming language that is fast, supports concurrency, and has built-in support for remote package management. It is well-suited for building network servers and applications with non-blocking I/O. The document provides examples of writing a simple "Hello World" program, building a basic HTTP server, and using goroutines for concurrency. It also outlines how to install Go, set up a development environment, and find additional learning resources.
2. What is go?
Statically-typed language //resembles C
Concurrency
Garbage collection
Type safety with some dynamic typing
Fast compilation
Remote package management
Great builtins
C + some Awesome stuff
4. Built for networks
A simple server
package main
import "fmt
Import "net/http
func hello(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello Client") //write response
}
func main() {
http.HandleFunc("/", hello //attach handler
http.ListenAndServe(":8080, nil) //start server
}
5. Concurrency
Green Threading like python goroutines
no Gil like limitations
https://gobyexample.com/goroutines
Utilize multiple cores
goroutines can be run on multiple threads
6. External pacakges
go get <package_name>
e.g. go get github.com/goibibo/gorpc
Installs to your specified path
easily install forks
Also checkout godep, https://github.com/tools/godep for better
managing dependencies of your project
8. Start- tour
Take the tour, complete it tour.golang.org
Check http://openmymind.net/The-
Little-Go-Book/ for a light introduction
9. Start- install
Install locally (1.4 for now)
http://golang.org/doc/install
Or the docker image if you prefer
https://hub.docker.com/r/google/golang/
10. Start more stuff
How to write Go code
Effective Go
http://golang.org/doc/effective_go.html
Best Practices
https://talks.golang.org/2013/bestpractic
es.slide#1
11. Start some more stuff
Organising Go code by David Crawshaw,
presented at Google I/O 2014.
Contributing to Open Source Git
Repositories in Go by Katrina Owen.
12. Dev Environment - editors
Sublime Text 3
http://eefret.me/making-sublime-your-golang-ide/
LiteIde
http://www.i-programmer.info/programming/other-
languages/6600-a-programmers-guide-to-go-with-
liteide-part-1.html
14. Right tool for the right problem
Good for
Backend APIs
Process Heavy stuff
Non blocking IO, service calls
Not so great
Templating
ORMs
But still growing