A fast, easy and minimalistic framework for web applications in Go.
goserv requires at least Go v1.6.0
package main
import (
"github.com/gotschmarcel/goserv"
"net/http"
"log"
)
func main() {
server := goserv.NewServer()
server.Get("/", func (w http.ResponseWriter, r *http.Request) {
goserv.WriteString(w, "Welcome Home")
}
log.Fatalln(server.Listen(":12345"))
}
$ go get github.com/gotschmarcel/goserv
- Fully compatible with net/http
- Robust and fast routing
- Middleware handlers
- Nested routers
- Request context
- URL parameters
- Response and request helpers
- Centralized error handling
Examples can be found in example_test.go
BSD licensed. See the LICENSE file for more information.