
Alex Edwards
Привет, я Алекс Эдвардс, full-stack веб-разработчик. Я начал работать с Golang 6 лет назад в 2013 году и почти столько же времени обучаю людей и пишу о языке. Я использовал Go для создания разнообразных производственных приложений, от простых веб-сайтов до высокочастотных торговых систем. Я также работаю над несколькими пакетами Go с открытым исходным кодом, включая популярную систему управления сессиями SCS.
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/