Last year, I have worked on a book titled “Web Development with Go” for Apress, which focuses on web programming in Go programming language. Now the book has been released on Amazon. The primary focus of the book is to provide a practical guidance for building web apps in Go, specifically on building RESTful services. The book uses a code-oriented approach for explaining technical aspects.
Here are the chapters of the book:
- Chapter 1: Getting Started With Go
- Chapter 2: Go Fundamentals
- Chapter 3: User Defined Types and Concurrency
- Chapter 4: Getting Started with Web Development
- Chapter 5: Working with Go Templates
- Chapter 6: HTTP Middleware
- Chapter 7: Authentication to Web Apps
- Chapter 8: Persistence with MongoDB
- Chapter 9: Building RESTful Services
- Chapter 10: Testing Go Applications
- Chapter 11: Building Go Web Applications on Google Cloud
The book starts with Go programming language fundamentals, as a prerequisite for web development. After getting an understanding on Go, the book takes a deep dive into web development using built-in package net/http and essential third-party packages . The book introduces MongoDB as the persistent storage, and finally provides an end-to-end REST API app with MongoDB.
The chapter 9 provides an end-to-end REST API app that uses the following major third-party packages along with standard library package net/http:
- gopkg.in/mgo.v2 — Package mgo provides MongoDB driver for Go.
- github.com/gorilla/mux — Package mux implements a request router and dispatcher.
- github.com/dgrijalva/jwt-go — Package jwt-go implements helper functions for working with JSON Web Tokens (JWT).
- github.com/codegangsta/negroni — Package negroni provides idiomatic approach to HTTP middleware.
The book is available on Amazon at Web Development with Go.
You can follow me on twitter at @shijucv. I do provide training and consulting on Go programming language (Golang) and distributed systems architectures, in India.