blob: fdf211d8a92d0d11b4438fef6125b15e6cd87080 [file] [log] [blame] [view]
Jason Buberel513e1d62015-08-29 14:24:35 -07001This page links to resources for learning about server programming in Go - both web services and mobile backends. The items are organized into sections by topic.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -05002
Sameer Ajmanicff97932015-01-09 10:37:29 -05003## Getting Started
4
Jason Buberel513e1d62015-08-29 14:24:35 -07005- Read [Writing Web Applications with the Go standard library](http://golang.org/doc/articles/wiki/)
6- Read [Building Web Applications in Go](https://www.gitbook.com/book/codegangsta/building-web-apps-with-go/details) from the author of the [Negroni](https://github.com/codegangsta/negroni) and [Martini](http://martini.codegangsta.io/) webserver toolkits.
7- Read [Build a Web Application With Go](https://github.com/astaxie/build-web-application-with-golang) from the author of the [BeeGo web framework](http://beego.me/)
Sameer Ajmanicff97932015-01-09 10:37:29 -05008- Code [A Tour of Go: Web Servers](http://tour.golang.org/methods/13) and [HTTP Handlers](http://tour.golang.org/methods/14)
Sameer Ajmani3f686852015-01-09 13:52:59 -05009- Watch [Go: code that grows with grace](http://talks.golang.org/2012/chat.slide#1)
Sameer Ajmani95ff2582015-01-09 10:23:11 -050010
Jason Buberel4934b5c2015-08-29 14:48:27 -070011### Middleware
12
13A topic you will see discussed frequently is "middleware". If you're not familiar with that term, we suggest you start out by reading a few of these articles:
14
15* [Writing Handsome Golang Middleware](http://laicos.com/writing-handsome-golang-middleware/) _2015-05-05_
16* [Middleware in Go: Best practices and examples](https://www.nicolasmerouze.com/middlewares-golang-best-practices-examples/) _2014-11-13_
17* [Making and Using HTTP Middleware](http://www.alexedwards.net/blog/making-and-using-middleware) _2014-10-21_
18* [Writing HTTP Middleware in Go](https://justinas.org/writing-http-middleware-in-go/) _2013-10-09_
19
20
21## Toolkits and Frameworks
22
23Before you decide to adopt a third party web framework or toolkit, keep in mind that the Go standard library provides all of the tools you need to build a sophisticated, modern web application. Keeping with Go's preference for simplicity and composability over complexity and magic, we suggest you [see how far the standard library can take you](http://golang.org/doc/articles/wiki/).
24
25If you decide you need a bit more infrastructure, start by looking at some of the toolkits and libraries available.
26
27### Toolikits & Libraries & Microframeworks
28
29* [Gorilla Toolkit](http://www.gorillatoolkit.org/)
30* [Negroni Toolkit - Idiomatic HTTP Middleware for Go](https://github.com/codegangsta/negroni)
31* [Echo Framework - Fast and Unfancy](http://echo.labstack.com/)
32* [Goji Web Microframework](https://goji.io/)
33* [Go Craft Middleware](https://github.com/gocraft/web)
Jason Bubereled9199d2015-08-29 17:42:46 -070034* [Go RESTful](https://github.com/emicklei/go-restful) - Toolkit for RESTful service APIs
35* [Kite Micro-service framework](https://github.com/koding/kite)
Jason Buberel4934b5c2015-08-29 14:48:27 -070036
37### Frameworks
38
39* [GinGonic](https://gin-gonic.github.io/gin/)
40* [Revel Web Framework](https://revel.github.io/)
41* [BeeGo Framework](http://beego.me/)
42
43
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050044## Communication
45
46- [Package net/http](http://golang.org/pkg/net/http) provides HTTP client and server implementations.
47- [Package encoding/json](http://golang.org/pkg/encoding/json) implements encoding and decoding of JSON objects as defined in RFC 4627.
48- [Package net/rpc](http://golang.org/pkg/net/rpc) provides access to the exported methods of an object across a network or other I/O connection.
49- [Package os/exec](http://golang.org/pkg/os/exec) runs external commands.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050050
51## Presentation
52
53- [Package text/template](http://golang.org/pkg/text/template) implements data-driven templates for generating textual output.
Christoffer G. Thomsenb726c992015-05-14 13:25:38 +020054- [Package html/template](http://golang.org/pkg/html/template) implements data-driven templates for generating HTML output safe against code injection.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050055
56## Profiling and Performance
57
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050058- Read [Profiling Go Programs](http://blog.golang.org/profiling-go-programs)
Sameer Ajmani95ff2582015-01-09 10:23:11 -050059- Read [Arrays, slices (and strings): The mechanics of 'append'](http://blog.golang.org/slices)
60- Read the [Frequently Asked Questions (FAQ)](http://golang.org/doc/faq), especially
61 - [Why does Go perform badly on benchmark X?](http://golang.org/doc/faq#Why_does_Go_perform_badly_on_benchmark_x)
62 - [Why do garbage collection? Won't it be too expensive?](http://golang.org/doc/faq#garbage_collection)
63- [Package bufio](http://golang.org/pkg/bufio) implements buffered I/O.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050064- [Package runtime/pprof](http://golang.org/pkg/runtime/pprof) writes runtime profiling data in the format expected by the pprof visualization tool.
65- [Package net/http/pprof](http://golang.org/pkg/net/http/pprof) serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool.
66
67## Tracing, Monitoring, Logging, and Configuration
68
69- [Package expvar](http://golang.org/pkg/expvar) provides a standardized interface to public variables, such as operation counters in servers.
70- [Package flag](http://golang.org/pkg/flag) implements command-line flag parsing.
71- [Package log](http://golang.org/pkg/log) implements a simple logging package.
72- [Package glog](https://github.com/golang/glog) implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
73
74## Storage
75
76- [Package os](http://golang.org/pkg/os) provides a platform-independent interface to operating system functionality.
77- [Package path/filepath](http://golang.org/pkg/path/filepath) implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths.
78- [Package database/sql](http://golang.org/pkg/database/sql) provides a generic interface around SQL (or SQL-like) databases.
79
80## Platforms
81
82### Google Cloud Platform
83
Sameer Ajmani3cd958d2015-01-09 12:26:49 -050084- Read [Google Cloud Platform: Go Runtime Environment](https://cloud.google.com/appengine/docs/go/)
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050085- Watch [Go and the Google Cloud Platform](http://blog.golang.org/go-and-google-cloud-platform)
86- Read [Go on App Engine: tools, tests, and concurrency](http://blog.golang.org/appengine-dec2013)
87- Read [Deploying Go servers with Docker](http://blog.golang.org/docker)
Sameer Ajmani42e6ba32015-01-09 08:46:27 -050088- Search packages for [Google Cloud](http://godoc.org/?q=google+cloud) or [gcloud](http://godoc.org/?q=gcloud)
89- Search packages for [App Engine](http://godoc.org/?q=appengine) or [GAE](http://godoc.org/?q=gae)
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050090
91### Amazon Web Services
92
Sameer Ajmanic32d6d32015-01-29 14:44:46 -050093- The [aws-sdk-go](https://github.com/awslabs/aws-sdk-go) repository provides automatically generated AWS clients in Go. It has [official support](http://aws.amazon.com/blogs/aws/coming-soon-aws-sdk-for-go) from Amazon.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050094- [Package goamz](https://wiki.ubuntu.com/goamz) enables Go programs to interact with the Amazon Web Services.
Sameer Ajmanid863b092015-01-09 14:40:10 -050095- Search packages for [AWS](http://godoc.org/?q=aws) or [Amazon services](http://godoc.org/?q=amazon+service)
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050096
97### Microsoft Azure
98
Sameer Ajmani5df457b2015-01-09 08:47:54 -050099- Microsoft OpenTech's [azure-sdk-for-go](https://github.com/MSOpenTech/azure-sdk-for-go) provides a Golang package that makes it easy to consume and manage Microsoft Azure Services.
Sameer Ajmani42e6ba32015-01-09 08:46:27 -0500100- Search packages for [Azure](http://godoc.org/?q=azure)
Brendan O'Donnellbecb6362015-05-20 16:22:09 -0500101
102### Openstack / Rackspace
103
104- Rackspace's [gophercloud](https://github.com/rackspace/gophercloud) is a Golang SDK for working with OpenStack clouds.
105- Search packages for [Openstack](http://godoc.org/?q=openstack) or [Rackspace](http://godoc.org/?q=rackspace)