Buffalo Documentation - Rapid Web Development in Go

website·Indexed Apr 12, 2026

https://gobuffalo.io/docs/

Official documentation for Buffalo, a rapid web development framework for Go. Covers installation, project initialization, routing, action controllers, and database integration with Pop and Soda. Includes guides on the Plush templating engine, rendering layers, middleware, error handling, and deployment via cross-compilation and packing. Supports PostgreSQL, CockroachDB, MySQL, and SQLite3.

Tokens
52.5K
Snippets
151
Records
653
Agent score
50%

What's inside Buffalo

  1. Access HTTP sessions from buffalo.Context

    Sessions are available directly from the buffalo.Context within any handler. Buffalo uses the github.com/gorilla/sessions package under the hood. HTTP sessions are non-persistent storage destroyed when the browser closes (default browser config). Use sessions for flash messages or temporary user-specific data. For persistent client-side storage, use cookies instead.
  2. Pop ORM package overview

    Pop is an ORM package included with Buffalo by default, but can be used standalone in Go projects. It wraps the sqlx library and provides CRUD operations, migrations, and query building/execution. It follows ActiveRecord conventions for automatic field mapping and table naming.
  3. Plush templating syntax in Buffalo

    Buffalo uses Plush as its default templating engine, providing a Rails-like syntax for Go web development. Plush supports custom helpers that allow you to extend the templating functionality with your own reusable template functions.
  4. Auto-generated test suites for Actions, resources, and models

    Buffalo generators (Action, resource, model) automatically create test templates for the generated code. These test suites can be executed using the Buffalo toolbox command.
  5. Gopher Guides support services for Buffalo

    Gopher Guides (founded by Mark Bates, Buffalo creator) provides official training, consulting, and support for the Buffalo ecosystem. Services include: code audits (version updates, testing, race conditions, performance, idiomatic code, routing), priority developer support (PR review, issue triage, feature requests, private Slack), and in-person team training.
  6. Grift: Task Runner for Go

    Grift is Buffalo's built-in task runner, similar to Ruby's Rake. It enables rapid execution of common development tasks such as database seeding and cleanup jobs. Tasks are defined in Go code and can be run from the command line.
  7. Test generation and execution in Buffalo

    Buffalo's generators automatically create test templates when you generate Actions, resources, or models. These test suites can be executed using a command from the Buffalo toolbox.
  8. Buffalo framework overview

    Buffalo is a Go web development ecosystem, not just a framework. It acts as the 'glue' between curated Go and JavaScript libraries that fit together out of the box. Most components can be swapped for alternatives, but only the default configuration receives official support.
  9. Flash messages for user notifications

    Flash messages are transient notifications (errors, warnings, success messages) passed from handlers to views. They survive a single redirect, making them ideal for post-action feedback like 'Widget was successfully created!' or 'Your account could not be updated.'
  10. Automatic test generation in Buffalo

    Buffalo generators (action, resource, model) automatically create test templates for the generated code. These test suites can be executed using the Buffalo toolbox command.
  11. Generate path helpers with buffalo routes

    Buffalo automatically generates path helpers for all routes added to the App. Run buffalo routes to see a list of all generated helpers. Path helpers are named by converting the route name to camelCase with a 'Path' suffix (e.g., /aboutaboutPath, /drinks/{drink_id}drinkPath). Resources generate helpers for each standard action. Parameterized routes accept a map[string]interface{} to fill URL slots: <%= drinkPath({drink_id: drink.ID}) %>.