Small, familiar, fast.

A lightweight server-side web framework for Go.

Goblet brings Flask-like simplicity to Go. Define routes, pass data, and render HTML templates without giving up Go's speed.

Install

go get github.com/aquiffoo/goblet

From zero to server

main.go
package main

import (
  "net/http"
  "github.com/aquiffoo/goblet"
)

func main() {
  app := goblet.New(true)

  app.Handle("/", func(w http.ResponseWriter, r *http.Request) {
    data := map[string]interface{}{
      "title": "Home",
    }
    app.Render(w, "index.html", data)
  })

  if err := app.Serve("8080"); err != nil {
    panic(err)
  }
}
01 — Create

Start an app with goblet.New.

02 — Route

Connect a path to a standard Go HTTP handler.

03 — Render

Pass your data directly into an HTML template.

04 — Serve

Run it locally on the port you choose.

Why Goblet

Familiar API

A small Flask-inspired surface that stays easy to read.

Go underneath

Standard HTTP primitives and compiled performance, with less ceremony.

Templates included

Render HTML files with route data through a straightforward interface.