I write HTTP services in Go after 13 years (Mat Ryer, 2024)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  1. picoshare

    A minimalist, easy-to-host service for sharing images and other files

    Not OP, but I design my Go projects with a very similar pattern that I learned from OP's 2018 post.

    I think this is a pretty good example of a real-world implementation:

    https://github.com/mtlynch/picoshare

    Particularly these files:

    https://github.com/mtlynch/picoshare/blob/2cd9979dab084ca781...

    https://github.com/mtlynch/picoshare/blob/2cd9979dab084ca781...

  2. InfluxDB

    InfluxDB high-performance time series database. Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.

    InfluxDB logo
  3. ogen

    OpenAPI v3 code generator for go

    https://github.com/ogen-go/ogen

    Write openapi definition, it'll do routing, definition of structs, validation of JSON schemas, etc.

    All I need to do is implement the service.

    Validating an integer range for a querystring parameter is just too boring. And too easy to mistype when writing it manually.

    Anyways, so far only been playing, so haven't found the bad parts yet.

  4. zanzibar

    A build system & configuration system to generate versioned API gateways.

    I wrote a static config class that reads configuration for the entire app / server from a JSON or YAML file ( https://github.com/uber/zanzibar/blob/master/runtime/static_... ).

    Once you've loaded it and mutated it for testing purposes or for copying from ENV vars into the config, you can then freeze it before passing it down to all your app level code.

    Having this wrapper object that can be frozen and has a `get()` method to read JSON like data make it effectively not mutable.

  5. fx

    A dependency injection based application framework for Go. (by uber-go)

    I found fx(https://github.com/uber-go/fx) to be a super simple yet versatile tool to design my application around.

    All the advice in the article is still helpful, but it takes the "how do I make sure X is initialized when Y needs it" part completely out of the equation and reduces it from an N*M problem to an N problem, ie I only have to worry about how to initialize individual pieces, not about how to synchronize initialization between them.

    I've used quite a few dependency injection libraries in various languages over the years (and implemented a couple myself) and the simplicity and versatility of fx makes it my favorite so far.

  6. PhotoPrism

    AI-Powered Photos App for the Decentralized Web 🌈💎✨

    out of curiosity, why no sort-of-established pkg and internal dirs? What do you think of https://github.com/photoprism/photoprism structure?

  7. guide

    The Uber Go Style Guide.

  8. huma

    A modern, simple, fast & flexible micro framework for building HTTP REST/RPC APIs in Go backed by OpenAPI 3 and JSON Schema.

  9. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  10. rest

    Web services with OpenAPI and JSON Schema done quick in Go (by swaggest)

  11. go-exhaustruct

    golang analyzer that finds structures with uninitialized fields

    Because go doesn’t have exhaustiveness checking when initialising structs. Instead it encourages “make the zero value meaningful” which is not always possible not desirable. I usually use a linter to catch this kind of problem https://github.com/GaijinEntertainment/go-exhaustruct

  12. zod

    TypeScript-first schema validation with static type inference

    So far I like the commonly used approach in the Typescript community best:

    1. Create your Schema using https://zod.dev or https://github.com/sinclairzx81/typebox

    2. Generate your Types from the schema. It's very simple to create partial or composite types, e.g. UpdateModel, InsertModels, Arrays of them, etc.

    3. Most modern Frameworks have first class support for validation, like is a great example Fastify (with typebox). Just reuse your schema definition.

    That is very easy, obvious and effective.

  13. typebox

    Json Schema Type Builder with Static Type Resolution for TypeScript

    So far I like the commonly used approach in the Typescript community best:

    1. Create your Schema using https://zod.dev or https://github.com/sinclairzx81/typebox

    2. Generate your Types from the schema. It's very simple to create partial or composite types, e.g. UpdateModel, InsertModels, Arrays of them, etc.

    3. Most modern Frameworks have first class support for validation, like is a great example Fastify (with typebox). Just reuse your schema definition.

    That is very easy, obvious and effective.

  14. grpc-gateway

    gRPC to JSON proxy generator following the gRPC HTTP spec

    it lacks flexibility but i really enjoy grpc-gateway for 99% of my work

    https://github.com/grpc-ecosystem/grpc-gateway

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • FastAPI Replacement - especially with openapi

    9 projects | /r/golang | 19 Jan 2023
  • Show HN: Gleece – Streamlined API development framework for Go

    2 projects | news.ycombinator.com | 7 Apr 2025
  • A Holistic View on APIs as an Ecosystem

    1 project | dev.to | 19 Mar 2025
  • The cost of Go's panic and recover

    5 projects | news.ycombinator.com | 4 Mar 2025
  • API testing through simulations

    4 projects | dev.to | 2 Mar 2025