skr

CircleCI
codecov
Go Report Card
GoDoc
Release
License

Overview

Introduction

The lightweight and powerful web framework using the new way for Go. Another go the way.

Features

  • Pure native, no third dependencies
  • Basic & Variables & Group router
  • REST-ful controllers
  • Binding
  • Middleware supports
  • Session supports
  • Rich Response supports

Install

require github.com/go-the-way/skr latest

Quickstart

package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"time"
	
	"github.com/go-the-way/skr"
	"github.com/go-the-way/skr/context"
)

func main() {
	go func() {
		time.AfterFunc(time.Second, func() {
			response, _ := http.Get("http://localhost:9494")
			resp, _ := ioutil.ReadAll(response.Body)
			fmt.Println(string(resp))
		})
	}()
	skr.DefaultApp.Get("/", func(ctx *context.Context) {
		ctx.Text("Hello world")
	}).Run()
}

Thanks

GitHub

View Github