build-web-application-with-golang
A golang ebook intro how to build a web with golang
Free online book teaching Go developers how to build complete web applications from scratch, HTTP, databases, templates, sessions, security, and deployment, using Go's standard library.
"Build Web Application with Golang" is a free, open-source online book (also available as a PDF) that teaches Go developers how to build web applications from the ground up using the Go programming language. Go, also known as Golang, is a compiled, statically typed language developed by Google, valued for its speed, simplicity, and strong built-in support for concurrency.
The book addresses a common gap: Go is often introduced in the context of systems programming or microservices, but developers who want to build a complete web application — handling HTTP requests, working with databases, rendering templates, managing sessions, and deploying to production — need a practical walkthrough that ties all those pieces together. This book fills that gap by walking through the full web development lifecycle in Go.
The README does not describe the chapter contents in detail, but based on the description and topics, it covers Go's built-in web primitives such as the net/http package, HTML templating, database access, form processing, session and cookie management, internationalization, error handling, security practices, and deployment. It is aimed at developers who know the basics of Go but haven't yet applied it to web programming.
The book is widely used as a reference for developers who want to avoid relying on large frameworks and instead understand how web mechanics work in idiomatic Go, using the standard library as much as possible. The approach is hands-on and practical.
The book is available in more than a dozen languages including English, Chinese, Russian, Japanese, Spanish, French, Portuguese, German, Turkish, and Thai. It is hosted on GitHub as Markdown files and also available on GitBook in HTML and PDF formats. The content is licensed under CC BY-SA 3.0 and the accompanying code examples under the BSD 3-Clause license.
Where it fits
- Learn how to handle HTTP requests, routing, and middleware in Go using the standard net/http package without heavy frameworks.
- Implement database access, form processing, and session management in a Go web application the idiomatic way.
- Build and deploy a complete Go web app to production, covering error handling, security practices, and internationalization.
- Understand how web mechanics work in Go by following a hands-on walkthrough from first principles.