• This repository has been archived on 03/Aug/2018
  • Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    Go
  • License
    BSD 3-Clause "New...
  • Created about 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight toolkit for web applications in Go

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.