Kid is a micro web framework written in Go. It aims to keep its core simple and yet powerful. It's fully compatible with net/http interfaces and can be adapted with other net/http compatible packages as well.
- Robust tree-based router.
- Path parameters.
- Router groups.
- Rich built-in responses(JSON, HTML, XML, string, byte).
- Middlewares.
- Zero dependency, only standard library.
- Compatible with net/http interfaces.
- Extendable, you can also use your own JSON, XML serializers or HTML renderer.
This package follows semver versioning.
To install Kid Go 1.19 or higher is required: go get github.com/mojixcoder/kid
Create server.go
:
package main
import (
"net/http"
"github.com/mojixcoder/kid"
)
func main() {
k := kid.New()
k.Get("/hello", helloHandler)
k.Run()
}
func helloHandler(c *kid.Context) {
c.JSON(http.StatusOK, kid.Map{"message": "Hello Kid!"})
}