Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

gotschmarcel/goserv

Repository files navigation

goserv

GoServ

A fast, easy and minimalistic framework for web applications in Go.

goserv requires at least Go v1.6.0

GoDoc Build Status

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"))
}

Installation

$ go get github.com/gotschmarcel/goserv

Features

  • 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

Examples can be found in example_test.go

License

BSD licensed. See the LICENSE file for more information.