Skip to main content
Mizu logo Mizu is a lightweight web framework for Go. The name means “water” in Japanese, reflecting the framework’s goal: to flow naturally with Go’s standard library rather than replacing it.

What is Mizu?

Mizu helps you build web servers and APIs in Go. If you’ve used Python’s Flask, Node’s Express, or Ruby’s Sinatra, Mizu fills a similar role but stays closer to how Go works. A web framework handles the repetitive parts of building HTTP servers:
  • Routing: Matching URLs like /users/123 to your code
  • Request handling: Reading data from forms, JSON bodies, and URLs
  • Response writing: Sending back JSON, HTML, or files
  • Middleware: Running shared code (logging, auth) before handlers

What makes Mizu different?

Mizu adds a thin layer over Go’s net/http package instead of replacing it:
FeatureWhat it doesWhy it matters
Go 1.22 ServeMux patternsRoutes like /users/{id} with path parametersUses the standard library, not a custom router
Context wrapperc.JSON(), c.Query(), c.Param() helpersLess boilerplate, cleaner handlers
Error returnsHandlers return errors directlyCentral error handling, simpler code
Graceful shutdownFinishes active requests before stoppingSafe deployments without dropped connections
Structured loggingUses Go’s slog packageJSON logs for production, readable logs for development
Everything stays explicit. There is no reflection, code generation, or hidden behavior. If you know Go’s net/http, you already understand how Mizu works.

Who is Mizu for?

Mizu is a good fit if you:
  • Know Go basics and want to build web APIs
  • Prefer explicit code over “magic” conventions
  • Want to use standard library patterns, not framework-specific ones
  • Need a small, focused tool rather than a full-stack framework
Mizu is not for you if you want an opinionated framework with ORM, admin panels, and auth built in. For those needs, consider frameworks like Buffalo or Beego.

A quick taste

Here’s a complete Mizu server in 15 lines:
package main

import "github.com/go-mizu/mizu"

func main() {
    app := mizu.New()

    app.Get("/", func(c *mizu.Ctx) error {
        return c.Text(200, "Hello, Mizu!")
    })

    app.Get("/users/{id}", func(c *mizu.Ctx) error {
        id := c.Param("id")
        return c.JSON(200, map[string]string{"user_id": id})
    })

    app.Listen(":3000")
}
When this runs:
  • Visiting http://localhost:3000/ returns “Hello, Mizu!” as plain text
  • Visiting http://localhost:3000/users/42 returns {"user_id":"42"} as JSON
  • Pressing Ctrl+C stops the server gracefully

Get started