Skip to content

mojixcoder/kid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test code quality coverage

Kid Micro Web Framework


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.

Features


  • 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.

Versioning


This package follows semver versioning.

Quick Start


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