Need help with web?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

3.6K Stars 822 Forks MIT License 325 Commits 47 Opened issues


The easiest way to create web applications with Go

Services available


Need anything else?

Contributors list

Build Status


web.go is the simplest way to write web applications in the Go programming language. It's ideal for writing simple, performant backend web services.


web.go should be familiar to people who've developed websites with higher-level web frameworks like sinatra or It is designed to be a lightweight web framework that doesn't impose any scaffolding on the user. Some features include:

  • Routing to url handlers based on regular expressions
  • Secure cookies
  • Support for fastcgi and scgi
  • Web applications are compiled to native code. This means very fast execution and page render speed
  • Efficiently serving static files


Make sure you have the a working Go environment. See the install instructions. web.go targets the Go


To install web.go, simply run:

go get

To compile it from source:

git clone git://
cd web && go build


package main

import ( "" )

func hello(val string) string { return "hello " + val }

func main() { web.Get("/(.*)", hello) web.Run("") }

To run the application, put the code in a file called hello.go and run:

go run hello.go

You can point your browser to http://localhost:9999/world .

Getting parameters

Route handlers may contain a pointer to web.Context as their first parameter. This variable serves many purposes -- it contains information about the request, and it provides methods to control the http connection. For instance, to iterate over the web parameters, either from the URL of a GET request, or the form data of a POST request, you can access

, which is a
package main

import ( "" )

func hello(ctx *web.Context, val string) { for k,v := range ctx.Params { println(k, v) } }

func main() { web.Get("/(.*)", hello) web.Run("") }

In this example, if you visit

, you'll see the following printed out in the terminal:
a 1
b 2


API docs are hosted at

If you use web.go, I'd greatly appreciate a quick message about what you're building with it. This will help me get a sense of usage patterns, and helps me focus development efforts on features that people will actually use.


web.go was written by Michael Hoisie

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.