Go - отличный язык для создания веб-приложений. Но самообучение из сообщений в блоге и документации стандартной библиотеки часто может оставить вас с большим количеством вопросов, чем ответов.
Вы наверное задавались вопросом:
Где я могу увидеть конкретный пример реального веб-приложения?
Как лучше структурировать и организовать мой код?
Как мне убедиться, что я не делаю ошибок, когда речь идет о безопасности?
Как использовать модули для управления и контроля версий?
И как мне эффективно протестировать мое веб-приложение?
Let's Go отвечает на эти вопросы для вас - и многое другое.
Книга поможет вам от начала до конца построить реальное приложение, так что вы получите все знания, понимание и уверенность, необходимые для создания готовых приложений с Go.
Что вы узнаете ...
Все основы - Как запустить сервер, создать обработчики, отправлять ответы, направлять запросы и обслуживать статические файлы.
Структура и организация - Как создать идиоматическую и масштабируемую структуру для вашего веб-приложения.
Использование модулей - Как использовать новые функциональные возможности модуля Go для управления и контроля версий ваших зависимостей.
Управление конфигурацией - Как использовать флаги командной строки и внедрение зависимостей для управления настройками приложения.
Ведение логов и обработка ошибок - Как реализовать уровневое ведение логов и централизованную обработку ошибок.
Базы данных SQL - Как спроектировать модель базы данных и настроить пул соединений
HTML-шаблоны - Как кэшировать ваши шаблоны, отображать динамические данные, создавать пользовательские функции и обрабатывать ошибки во время выполнения.
Промежуточное программное обеспечение - Как создать собственное промежуточное программное обеспечение для выполнения общих действий (таких как регистрация запросов и восстановление паники).
RESTful маршрутизация - Как создать современную структуру маршрутизации запросов, которая следует принципам REST.
Проверка формы - Как реализовать многоразовый и удобный шаблон для проверки форм и отображения ошибок.
Управление сеансами. Как использовать и настраивать сеансы для сохранения данных между запросами.
Использование HTTPS - Как правильно настроить сервер HTTPS и настроить его для повышения производительности и безопасности.
Предотвращение распространенных уязвимостей - Как предотвратить внедрение SQL иньекций, CSRF, XSS, перехват кликов и т.д.
Аутентификация и авторизация - Как безопасно шифровать пароли пользователей и добавлять функции регистрации, входа и выхода.
Request context - Как использовать контекст Go.Context для передачи данных между промежуточным программным обеспечением и обработчиками.
Тестирование - Как создавать модульные тесты, интеграционные тесты и сквозные тесты, фиктивные зависимости и измерять охват тестами.
И самое главное ... Как собрать все это в полнофункциональное приложение!
Привет, я Алекс Эдвардс, full-stack веб-разработчик. Я начал работать с Golang 6 лет назад в 2013 году и почти столько же времени обучаю людей и пишу о языке. Я использовал Go для создания разнообразных производственных приложений, от простых веб-сайтов до высокочастотных торговых систем. Я также работаю над несколькими пакетами Go с открытым исходным кодом, включая популярную систему управления сессиями SCS.
Chapter 10.7 (CSRF protection) has been rewritten to discuss the new http.CrossOriginProtection middleware introduced in Go 1.25, and highlight the difference between cross-site and cross-origin requests. The additional information section at the end has been updated to provide an example of a 'modern' approach to preventing CSRF using TLS 1.3, SameSite=Lax cookies, and the http.CrossOriginProtection middleware.
Code changes
The recoverPanic middleware now uses fmt.Errorf with the %v verb (instead of %s) to convert the value returned by recover() into an error value.
The testServer type now has resetClientCookieJar() method, which resets the cookie jar for the test server client. This method is now called at the start of each sub-test in the TestSnippetView and TestUserSignup functions, to eliminate the risk of cookies set by a previous sub-test affecting the current sub-test.
The testServer.get and testServer.postForm methods now return a single testResponse struct. This struct contains the response status, headers, cookies and body, rather than returning them all as separate values.
The testServer.postForm method now sets a Sec-Fetch-Site: same-origin header on all requests. This fixes an incompatibility with v1.2.0 of the justinas/nosurf package.
Dependencies updated: github.com/go-sql-driver/mysql to v1.9.3, golang.org/x/crypto to 0.41.0, github.com/alexedwards/scs/v2 to 2.9.0, github.com/alexedwards/scs/mysqlstore to v0.0.0-20250417082927-ab20b3feb5e9.
Content changes
Chapter 4.3 (Modules and reproducible builds) has been updated to remove the -u flag from the go get command examples. A warning has been added to explain that the -u flag may upgrade child dependencies beyond their intended version, which increases the risk of breakages. The chapter also now includes an example command for listing upgradable direct dependencies.
Chapter 6.4 (Panic recovery) has been rewritten to tighten up wording and provide a clearer explanation of what happens following a panic.
Chapter 7.6 (Automatic form parsing) now includes a discussion about panicking vs returning errors in the additional information section.
Various typo fixes, and lots of minor copy tweaks to improve clarity throughout the book.
pigggib
CourseHunter Team
Спасибо большое, и пожалуйста вторую книгу этого автора Let's Go Further by Alex Edwards.
pigggib
Dear admin, if you have free time and opportunity, please update both books by the author.
Last updated: August 17th, 2025
Anonymous
Hi can you please update it?
Kosingas
Hi can you please update it?
kubo
Can you please update it?
Anonymous
Please update. It is version 2.24.2 now.
lodiwe4677
Anonymous
can send it me
CourseHunter Team
Anonymous
Updated!
Anonymous
CourseHunter Team
Thanks a lot.
andrew.z
Hello @admin can you please update the book it’s 2.22.1 version now thanks
CourseHunter Team
Note: The Go 1.22 changes to http.ServeMux resulted in some rewriting and reordering of the content in the book. If you're currently part-way through reading the book, I recommend continuing with your existing copy (rather than switching to the new version), then reviewing the Foundations section of the Go 1.22 version to learn about the http.ServeMux routing changes at a later point.
Go 1.22 http.ServeMux updates
The standard library http.ServeMux is now used for routing throughout the book instead of julienschmidt/httprouter.
There are two new chapters --- 2.4. (Wildcard route patterns) and 2.5. (Method-based routing) --- which explain how to use the new http.ServeMux routing features. Chapter 2.3. (Routing requests) has also been rewritten to reflect the Go 1.22 changes. The old Section 7. (Advanced routing) has been removed entirely.
The change to use the new http.ServeMux routing features had a few additional knock-on effects.
Because http.ServeMux doesn't make it possible to easily serve custom 404 responses without breaking 405 responses (see https://github.com/golang/go/issues/61410#issuecomment-1871202015), the book no longer uses a custom notFound() helper. Instead, the http.NotFound() function is used whenever we need to send a 404 response.
How to work with query strings is now covered at the end of Chapter 7.2. (Parsing form data).
The information on customizing HTTP status codes and response headers has been rewritten, and can now be found in Chapter 2.6. (Customizing responses).
Other Go 1.22 language updates
Chapter 9.5. (Configuring HTTPS settings) has been updated to reflect that http.Server now only supports TLS 1.2 and TLS 1.3 by default.
Chapter 12.1. (Embedding static files) has been updated to use the new http.FileServerFS() function for serving static files.
Chapter 13.8. (Profiling test coverage) has been updated to reflect the new output generated by go test -cover.
Other updates
Chapter 4.3. (Modules and reproducible builds) has been updated to explain the // indirect annotation in go.mod files.
The openDB() function in Chapter 4.4. (Creating a database connection pool) has been updated to close the connection pool before returning in the event of a failed Ping().
The secureHeaders() middleware in chapter 6.2. has been renamed to commonHeaders().
Chapter 9.3. (Generating a self-signed TLS certificate) now suggests using the mkcert tool as an alternative to generating your own self-signed certificates.
The newTestDB() function in Chapter 13.7. (Integration testing) has been updated to always close the connection pool before returning in the event of an error.
Various typo fixes and minor copy tweaks to improve clarity. Thanks to everyone who provided feedback!
anon92929
Can we get the latest update please?
kubo
Can we get the latest update please?
Anonymous
Hi. Is there any Java book similar to this and the second one by this author? I want to use the book to solve 1-2 serious projects using standard cloude stack (Spring, Hibernate, Postgres, Kafka and so on).
vishu
please update, it dont looks like its latest version
CourseHunter Team
vishu
it's a latest version
Anonymous
Update, please
kubo
can we get the latest update please?
Nick
Update please
lucasaho2
Does it have the HTML files?
kubo
Can you please update this one too?
Anonymous
@admin Andrew, please update. Thanks
HunterXHunter
@admin Andrew, please update. Thanks
kubo
Updated for Go 1.19. Please update!
Anonymous
Admin, please update
The current update is for: Go 1.18
Anonymous
Admin, please update
The current update is for: Go 1.18
Anonymous
Admin, please update
The current update is for: Go 1.18
HunterXHunter
@admin Andrew, please update Alex Edwards books
dealvidit
Would really appreciate an update to both the books.
nalewka0
@admin plis update
Anonymous
@admin, Andrew, please update
Anonymous
@admin, Andrew, please update
Anonymous
@admin, Andrew, please update
Anonymous
Please update the book for Go new version 18
Anonymous
Please update the book for Go new version 18
Augustine
Please update the book for Go 1.18 (Last updated: April 26th, 2022)
Augustine
Augustine
@Coursehunters Team
Anonymous
404 Not Found
eminem05051
update to Last updated: October 29th, 2021, please.
JarvisJack
Can you please update this
Umaru
Last updated: August 21st, 2021
Umaru
Last updated: August 5th, 2021
Anonymous
@admin please update?
Last updated 2021-08-05 12:04:50 UTC. Version 1.6.2.
chunter
Please update this to the latest book version 1.6.1. It uses Go 1.16.
Released on: August 5th, 2021 - From the official page.
BS
Please update this book
BS
Please update this book. Newer version of updated book is available now
BS
Please check newly Updated for Go 1.16
Anonymous
Please can this be updated? It now supports go version 1.1.6
vision8r
Can you please update it to the latest 1.5.2 version?
This was released on 2021-03-03 (according to https://lets-go.alexedwards.net/).
Anonymous
Добрый день!
Обновите книгу пожалуйста
DummyHead
Please update to the new version. It uses Go 1.15
BS
Please Update it. Author updated for latest go version 1.15
arch.ulver
Обновите пожалуйста.
Toltec
arch.ulver
а что там нового?
XpycT
update please
Kafka
Hello,
Could you supply this book?
https://buildsaasappingo.com/
Go 1.25 language updates
Chapter 10.7 (CSRF protection) has been rewritten to discuss the new http.CrossOriginProtection middleware introduced in Go 1.25, and highlight the difference between cross-site and cross-origin requests. The additional information section at the end has been updated to provide an example of a 'modern' approach to preventing CSRF using TLS 1.3, SameSite=Lax cookies, and the http.CrossOriginProtection middleware.
Code changes
The recoverPanic middleware now uses fmt.Errorf with the %v verb (instead of %s) to convert the value returned by recover() into an error value.
The testServer type now has resetClientCookieJar() method, which resets the cookie jar for the test server client. This method is now called at the start of each sub-test in the TestSnippetView and TestUserSignup functions, to eliminate the risk of cookies set by a previous sub-test affecting the current sub-test.
The testServer.get and testServer.postForm methods now return a single testResponse struct. This struct contains the response status, headers, cookies and body, rather than returning them all as separate values.
The testServer.postForm method now sets a Sec-Fetch-Site: same-origin header on all requests. This fixes an incompatibility with v1.2.0 of the justinas/nosurf package.
Dependencies updated: github.com/go-sql-driver/mysql to v1.9.3, golang.org/x/crypto to 0.41.0, github.com/alexedwards/scs/v2 to 2.9.0, github.com/alexedwards/scs/mysqlstore to v0.0.0-20250417082927-ab20b3feb5e9.
Content changes
Chapter 4.3 (Modules and reproducible builds) has been updated to remove the -u flag from the go get command examples. A warning has been added to explain that the -u flag may upgrade child dependencies beyond their intended version, which increases the risk of breakages. The chapter also now includes an example command for listing upgradable direct dependencies.
Chapter 6.4 (Panic recovery) has been rewritten to tighten up wording and provide a clearer explanation of what happens following a panic.
Chapter 7.6 (Automatic form parsing) now includes a discussion about panicking vs returning errors in the additional information section.
Various typo fixes, and lots of minor copy tweaks to improve clarity throughout the book.
Last updated: August 17th, 2025
Go 1.22 http.ServeMux updates
The standard library http.ServeMux is now used for routing throughout the book instead of julienschmidt/httprouter.
There are two new chapters --- 2.4. (Wildcard route patterns) and 2.5. (Method-based routing) --- which explain how to use the new http.ServeMux routing features. Chapter 2.3. (Routing requests) has also been rewritten to reflect the Go 1.22 changes. The old Section 7. (Advanced routing) has been removed entirely.
The change to use the new http.ServeMux routing features had a few additional knock-on effects.
Because http.ServeMux doesn't make it possible to easily serve custom 404 responses without breaking 405 responses (see https://github.com/golang/go/issues/61410#issuecomment-1871202015), the book no longer uses a custom notFound() helper. Instead, the http.NotFound() function is used whenever we need to send a 404 response.
How to work with query strings is now covered at the end of Chapter 7.2. (Parsing form data).
The information on customizing HTTP status codes and response headers has been rewritten, and can now be found in Chapter 2.6. (Customizing responses).
Other Go 1.22 language updates
Chapter 9.5. (Configuring HTTPS settings) has been updated to reflect that http.Server now only supports TLS 1.2 and TLS 1.3 by default.
Chapter 12.1. (Embedding static files) has been updated to use the new http.FileServerFS() function for serving static files.
Chapter 13.8. (Profiling test coverage) has been updated to reflect the new output generated by go test -cover.
Other updates
Chapter 4.3. (Modules and reproducible builds) has been updated to explain the // indirect annotation in go.mod files.
The openDB() function in Chapter 4.4. (Creating a database connection pool) has been updated to close the connection pool before returning in the event of a failed Ping().
The secureHeaders() middleware in chapter 6.2. has been renamed to commonHeaders().
Chapter 9.3. (Generating a self-signed TLS certificate) now suggests using the mkcert tool as an alternative to generating your own self-signed certificates.
The newTestDB() function in Chapter 13.7. (Integration testing) has been updated to always close the connection pool before returning in the event of an error.
Dependency updates
github.com/alexedwards/scs/mysqlstore -> v0.0.0-20240203174419-a38e822451b6
github.com/alexedwards/scs/v2 -> v2.8.0
github.com/go-sql-driver/mysql -> v1.8.0
golang.org/x/crypto -> v0.21.0
Miscellaneous
Various typo fixes and minor copy tweaks to improve clarity. Thanks to everyone who provided feedback!
The current update is for: Go 1.18
The current update is for: Go 1.18
The current update is for: Go 1.18
Last updated 2021-08-05 12:04:50 UTC. Version 1.6.2.
Released on: August 5th, 2021 - From the official page.
This was released on 2021-03-03 (according to https://lets-go.alexedwards.net/).
Обновите книгу пожалуйста
Could you supply this book?
https://buildsaasappingo.com/