blob: ea90ebdb7ec0269f97a8384288f263484efc4fc2 [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/)
Julian Lawrenceb710e042016-08-11 13:16:26 -07006- Read [Build a Web Application With Go](https://www.gitbook.com/book/astaxie/build-web-application-with-golang/details) from the author of the [BeeGo web framework](http://beego.me/)
Suraj Patile4df4aa2016-02-26 23:19:29 +05307- Read [Webapps in Go the anti textbook](https://github.com/thewhitetulip/web-dev-golang-anti-textbook)
8- 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. First learn the absolute basics before going to this book.
9- Read [Building Your Own Web Framework in Go](https://www.nicolasmerouze.com/build-web-framework-golang/) a 5-part series.
Sameer Ajmani3f686852015-01-09 13:52:59 -050010- Watch [Go: code that grows with grace](http://talks.golang.org/2012/chat.slide#1)
Jason Buberel8980a232015-09-12 15:45:21 -070011- Download a [full working 3-tier application example](https://github.com/sourcegraph/thesrc) from the Sourcegraph Team.
Sameer Ajmani95ff2582015-01-09 10:23:11 -050012
Jason Buberel8980a232015-09-12 15:45:21 -070013### Middleware
Jason Buberel4934b5c2015-08-29 14:48:27 -070014
15A 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:
16
17* [Writing Handsome Golang Middleware](http://laicos.com/writing-handsome-golang-middleware/) _2015-05-05_
18* [Middleware in Go: Best practices and examples](https://www.nicolasmerouze.com/middlewares-golang-best-practices-examples/) _2014-11-13_
Jason Buberel86ae5ef2015-08-30 08:19:59 -070019* Custom Handlers [Part 1 - Avoiding Globals](http://elithrar.github.io/article/custom-handlers-avoiding-globals/), [Part 2 - Error Handling](http://elithrar.github.io/article/http-handler-error-handling-revisited/) _2014-07-16_
Jason Buberel4934b5c2015-08-29 14:48:27 -070020* [Making and Using HTTP Middleware](http://www.alexedwards.net/blog/making-and-using-middleware) _2014-10-21_
21* [Writing HTTP Middleware in Go](https://justinas.org/writing-http-middleware-in-go/) _2013-10-09_
22
23
24## Toolkits and Frameworks
25
26Before 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/).
27
28If you decide you need a bit more infrastructure, start by looking at some of the toolkits and libraries available.
29
Glenn Lewise41c0492015-10-30 15:20:26 +110030### Toolkits & Libraries & Microframeworks
Jason Buberel4934b5c2015-08-29 14:48:27 -070031
32* [Gorilla Toolkit](http://www.gorillatoolkit.org/)
Jason Buberel8980a232015-09-12 15:45:21 -070033* [Negroni Toolkit - Idiomatic HTTP Middleware for Go](https://github.com/codegangsta/negroni)
Jason Buberel4934b5c2015-08-29 14:48:27 -070034* [Echo Framework - Fast and Unfancy](http://echo.labstack.com/)
35* [Goji Web Microframework](https://goji.io/)
36* [Go Craft Middleware](https://github.com/gocraft/web)
Jason Bubereled9199d2015-08-29 17:42:46 -070037* [Go RESTful](https://github.com/emicklei/go-restful) - Toolkit for RESTful service APIs
Jason Buberelca37ce22015-10-09 11:17:28 -070038* [limiter](https://github.com/ulule/limiter) - Simple rate-limiting middleware for Go
Jason Bubereled9199d2015-08-29 17:42:46 -070039* [Kite Micro-service framework](https://github.com/koding/kite)
Jason Buberel6c10cf92015-09-19 10:49:44 -070040* [Alice - Painless middleware chaining for Go](https://github.com/justinas/alice)
Jason Buberelf62e28f2015-10-03 08:56:13 -070041* [YAM - Yet Another Mux](https://github.com/thisissoon/yam)
Jason Buberel86506962015-10-03 12:35:09 -070042* [Bone - Fast HTTP Router](http://go-zoo.github.io/bone/)
Jason Buberel4934b5c2015-08-29 14:48:27 -070043
44### Frameworks
45
Jason Buberel4934b5c2015-08-29 14:48:27 -070046* [BeeGo Framework](http://beego.me/)
Jason Buberel2de0e662015-09-19 11:22:42 -070047* [Frodo](https://github.com/kn9ts/frodo) - Go mini web framework inspired by Laravel(php), Slim(php) and ExpressJS(node.js)
Jason Buberelca37ce22015-10-09 11:17:28 -070048* [GinGonic](https://gin-gonic.github.io/gin/)
49* [Macaron](https://github.com/Unknwon/macaron) - Productive, modular web framework in Go.
50* [Revel Web Framework](https://revel.github.io/)
Anton C. SwartzIV988614e2016-06-22 15:24:24 -040051* [Ringo](https://github.com/jjyr/ringo) - Lightweight MVC web framework inspired by Rails, Gin.
Jason Buberel2de0e662015-09-19 11:22:42 -070052* [Utron](https://github.com/gernest/utron) - Lightweight MVC framework for web applications.
Anton C. SwartzIV988614e2016-06-22 15:24:24 -040053* [Iris](https://github.com/kataras/iris/) - Fast MVC framework for web applications.
Jason Buberel4934b5c2015-08-29 14:48:27 -070054
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050055## Communication
56
57- [Package net/http](http://golang.org/pkg/net/http) provides HTTP client and server implementations.
58- [Package encoding/json](http://golang.org/pkg/encoding/json) implements encoding and decoding of JSON objects as defined in RFC 4627.
59- [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.
60- [Package os/exec](http://golang.org/pkg/os/exec) runs external commands.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050061
62## Presentation
63
64- [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 +020065- [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 -050066
67## Profiling and Performance
68
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050069- Read [Profiling Go Programs](http://blog.golang.org/profiling-go-programs)
Sameer Ajmani95ff2582015-01-09 10:23:11 -050070- Read [Arrays, slices (and strings): The mechanics of 'append'](http://blog.golang.org/slices)
71- Read the [Frequently Asked Questions (FAQ)](http://golang.org/doc/faq), especially
72 - [Why does Go perform badly on benchmark X?](http://golang.org/doc/faq#Why_does_Go_perform_badly_on_benchmark_x)
73 - [Why do garbage collection? Won't it be too expensive?](http://golang.org/doc/faq#garbage_collection)
74- [Package bufio](http://golang.org/pkg/bufio) implements buffered I/O.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050075- [Package runtime/pprof](http://golang.org/pkg/runtime/pprof) writes runtime profiling data in the format expected by the pprof visualization tool.
76- [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.
77
78## Tracing, Monitoring, Logging, and Configuration
79
80- [Package expvar](http://golang.org/pkg/expvar) provides a standardized interface to public variables, such as operation counters in servers.
81- [Package flag](http://golang.org/pkg/flag) implements command-line flag parsing.
82- [Package log](http://golang.org/pkg/log) implements a simple logging package.
83- [Package glog](https://github.com/golang/glog) implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
84
85## Storage
86
87- [Package os](http://golang.org/pkg/os) provides a platform-independent interface to operating system functionality.
88- [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.
89- [Package database/sql](http://golang.org/pkg/database/sql) provides a generic interface around SQL (or SQL-like) databases.
90
91## Platforms
92
93### Google Cloud Platform
94
Jason Buberel8980a232015-09-12 15:45:21 -070095- Read [Go, Cloud Endpoints and App Engine, Part 1](https://medium.com/google-cloud/go-cloud-endpoints-and-app-engine-19d290dafda3), [Part 2](https://medium.com/@IndianGuru/go-cloud-endpoints-and-app-engine-e3413c01c484)
Sameer Ajmani3cd958d2015-01-09 12:26:49 -050096- Read [Google Cloud Platform: Go Runtime Environment](https://cloud.google.com/appengine/docs/go/)
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -050097- Watch [Go and the Google Cloud Platform](http://blog.golang.org/go-and-google-cloud-platform)
98- Read [Go on App Engine: tools, tests, and concurrency](http://blog.golang.org/appengine-dec2013)
rakyll0390c462015-09-08 19:38:27 -070099- Get [Google Cloud Platform Go Libraries](http://godoc.org/google.golang.org/cloud)
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -0500100- Read [Deploying Go servers with Docker](http://blog.golang.org/docker)
Sameer Ajmani42e6ba32015-01-09 08:46:27 -0500101- Search packages for [Google Cloud](http://godoc.org/?q=google+cloud) or [gcloud](http://godoc.org/?q=gcloud)
102- Search packages for [App Engine](http://godoc.org/?q=appengine) or [GAE](http://godoc.org/?q=gae)
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -0500103
104### Amazon Web Services
105
Jason Buberelafc2fb22015-11-19 15:13:23 -0800106- The [aws-sdk-go](https://github.com/aws/aws-sdk-go) repository provides automatically generated AWS clients in Go. It has [official support](https://aws.amazon.com/blogs/aws/now-available-version-1-0-of-the-aws-sdk-for-go/) from Amazon.
Sameer Ajmani7c9bcc12015-01-08 16:45:32 -0500107- [Package goamz](https://wiki.ubuntu.com/goamz) enables Go programs to interact with the Amazon Web Services.
Sameer Ajmanid863b092015-01-09 14:40:10 -0500108- 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 -0500109
110### Microsoft Azure
111
Sameer Ajmani5df457b2015-01-09 08:47:54 -0500112- 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 -0500113- Search packages for [Azure](http://godoc.org/?q=azure)
Brendan O'Donnellbecb6362015-05-20 16:22:09 -0500114
115### Openstack / Rackspace
116
117- Rackspace's [gophercloud](https://github.com/rackspace/gophercloud) is a Golang SDK for working with OpenStack clouds.
Jason Buberel6c10cf92015-09-19 10:49:44 -0700118- Search packages for [Openstack](http://godoc.org/?q=openstack) or [Rackspace](http://godoc.org/?q=rackspace)
Jason Buberel3151dab2015-10-29 21:06:25 -0700119
120### IBM BlueMix
121
122- [Write your first Golang app on BlueMix](https://developer.ibm.com/bluemix/2015/10/28/getting-started-with-golang-on-bluemix/)