Skip to content

elithrar/goji-1

 
 

Repository files navigation

Goji

Goji is a minimalistic and flexible HTTP request multiplexer.

Quick Start

package main

import (
        "fmt"
        "net/http"

        "goji.io"
        "goji.io/pat"
        "golang.org/x/net/context"
)

func hello(ctx context.Context, w http.ResponseWriter, r *http.Request) {
        name := pat.Param(ctx, "name")
        fmt.Fprintf(w, "Hello, %s!", name)
}

func main() {
        mux := goji.NewMux()
        mux.HandleFuncC(pat.Get("/hello/:name"), hello)

        http.ListenAndServe("localhost:8000", mux)
}

Please refer to Goji's GoDoc Documentation for a full API reference.

Stability

As of this writing (late November 2015), this version of Goji is still very new, and during this initial experimental stage it offers no API stability guarantees. After the API has had a little time to bake, Goji expects to adhere strictly to the Go project's compatibility guidelines, guaranteeing to never break compatibility with existing code.

We expect to be able to make such a guarantee by early 2016. Although we reserve the right to do so, there are no breaking API changes planned until that point, and we are unlikely to accept any such breaking changes.

Community / Contributing

Goji maintains a mailing list, gojiberries, where you should feel welcome to ask questions about the project (no matter how simple!), to announce projects or libraries built on top of Goji, or to talk about Goji more generally. Goji's author (Carl Jackson) also loves to hear from users directly at his personal email address, which is available on his GitHub profile page.

Contributions to Goji are welcome, however please be advised that due to Goji's stability guarantees interface changes are unlikely to be accepted.

All interactions in the Goji community will be held to the high standard of the broader Go community's Code of Conduct.

About

Goji is a minimalistic and flexible HTTP request multiplexer for Go (golang)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%