Alex Edwards
alexedwards.net · Personal blog · on HN since 2013
Alex Edwards is a Go developer and author who writes practical guides on web development in Go, including routers, middleware, and forms.
What HN saysHN commenters recommend his books Let's Go and Let's Go Further, and link his posts on form validation and middleware.
25HN people shared it
3linked it in comments
42stories submitted
325story points
4 months agolast shared
2013people per year2026
Most-shared posts
- 1An Overview of Go's Tooling3 people · 8 points · first shared 2019 · discussion on HN
- 2Which Go router should I use? (with flowchart) – Alex Edwards3 people · 6 points · first shared 2021 · discussion on HN
- 3Go Naming Conventions: A Practical Guide3 people · 3 points · first shared 2026 · discussion on HN
- 4Form Validation and Processing in Go2 people · 6 points · first shared 2013 · 1 comments on HN
- 5Gorilla vs Pat vs Routes: A Mux Showdown2 people · 4 points · first shared 2013 · 1 comments on HN
- 6Organize your Go middleware without dependencies2 people · 4 points · first shared 2025 · discussion on HN
- 7Surprises and Gotchas When Working with JSON2 people · 2 points · first shared 2020 · discussion on HN
- 8A modern approach to preventing CSRF in Go1 people · 146 points · first shared 2025 · 98 comments on HN
- 9Practical Persistence in Go: SQL Databases1 people · 41 points · first shared 2015 · 3 comments on HN
- 10The ‘fat service’ pattern for Go web applications1 people · 31 points · first shared 2022 · 13 comments on HN
- 11Golang Automatic Reloads1 people · 30 points · first shared 2013 · 10 comments on HN
- 12A Complete Guide to Working with Cookies in Go1 people · 4 points · first shared 2022 · discussion on HN
- 13Go test assertions I use (and why)1 people · 4 points · first shared 2025 · discussion on HN
- 14Serving Static Sites with Go1 people · 3 points · first shared 2013 · discussion on HN
- 15Flow: Delightfully tiny but powerful HTTP router for Go1 people · 3 points · first shared 2022 · discussion on HN
What HN people wrote when they linked it
codegeek · 2024-09-29
Other than some of the resources mentioned already in comments, I highly recommend Alex Edwards books Lets Go and Lets go Further. Helped me a lot and still does when building Web Applications.
https://www.alexedwards.net/
https://lets-go.alexedwards.net/
https://lets-go-further.alexedwards.net/
aaron-lebo · 2014-09-01
This article turns into the creation of a small web app, so while not exactly relevant, I'll ask here: are there any good form validation libraries for Go?
I ended up using this approach:
http://www.alexedwards.net/blog/form-validation-and-processing
This is straightforward but also manual and low-level.
In comparison is Python's formencode library which is declarative and high-level:
class Registration(formencode.Schema):
first_name = validators.ByteString(not_empty=True)
last_name = validators.ByteString(not_empty=True)
email = validators.Email(resolve_domain=True)
username = formencode.All(validators.PlainText(),UniqueUsername())
password = SecurePassword()
password_confirm = validators.ByteString()
chained_validators = [validators.FieldsMatch('password', 'password_confirm')]
I thought about how you could design a library like this in Go, but couldn't think of a way that did not end up using reflection or plain maps, which defeats the purpose of using static typing.
Is this lack of validation libraries due to the lack of people writing web apps with the language or is it a problem of expressiveness with the language itself?
I ran into this issue several times when trying to write a web app in Go. A lot of the basic infrastructure is there, but the niceties are missing. The template language, for example, is great but lacks something as basic as inheritance without kludges. There are other templating…
pphysch · 2021-08-28
No need to embed function calls everywhere. The integration of authorization middleware should only be as complicated as your routing:
mux.Handle("/", middlewareOne(middlewareTwo(finalHandler)))
https://www.alexedwards.net/blog/making-and-using-middleware