Requirements
Before installing Mizu, ensure you have:| Requirement | Version | Notes |
|---|---|---|
| Go | 1.22+ | Required for enhanced ServeMux patterns |
| Operating System | Any | Linux, macOS, Windows all supported |
Checking Your Go Version
Installation Methods
Method 1: As a Library (Recommended)
Add Mizu to your existing Go project:main.go:
Method 2: Using the CLI
The Mizu CLI provides project scaffolding and development tools.Install the CLI
$GOPATH/bin (or $HOME/go/bin) is in your PATH:
Verify Installation
Create a New Project
Run in Development Mode
Method 3: Using Templates
Start with a pre-configured project structure:Your First Program
Hereβs a complete βHello Worldβ example:Running the Program
Testing the API
IDE Setup
VS Code
- Install the Go extension
- Open your project folder
- VS Code will prompt to install Go tools - accept all
.vscode/settings.json):
GoLand
- Open your project as a Go project
- GoLand automatically detects go.mod
- Wait for indexing to complete
- Enable βFormat on Saveβ
- Enable βOptimize imports on Saveβ
Other Editors
For Vim/Neovim, use gopls with your preferred LSP client. For Emacs, use lsp-mode with gopls.Adding Middlewares
Middlewares are installed as separate packages:Project Structure
Recommended structure for larger applications:Verifying Installation
Run these checks to ensure everything is set up correctly:1. Check Go Version
2. Check Mizu Import
3. Run a Test Server
Troubleshooting
βgo: module not foundβ
Ensure you have Go 1.22+ and run:βcommand not found: mizuβ
Add Goβs bin directory to your PATH:Port Already in Use
Change the port in your app:Next Steps
Quick Start
Build your first complete application.
Core Concepts
Learn about App, Router, Handler, and Context.
Building Blocks
Explore the Mizu component ecosystem.