flygo
![GoDoc](https://pkg.go.dev/badge/github.com/billcoding/flygo?status.svg)
Overview
Introduction
A simple and lightweight web framework, pure native and no third dependencies.
Features
- Pure native
- No third dependencies
- Middleware supports
- Session supports
- REST-ful controllers
- Binding & Validator
- Session supports
- Basic & Variable & Group router
- Multiple supports
- Rich render supports
Install
Install by Go PATH
mkdir -p $GOPATH/src/github.com/billcoding/flygo
cd $GOPATH/src/github.com/billcoding
git clone https://github.com/billcoding/flygo.git flygo
Install by Go Module
require github.com/billcoding/flygo latest
Quickstart
Build hello world App
package main
import (
"fmt"
"github.com/billcoding/flygo"
. "github.com/billcoding/flygo/context"
"io/ioutil"
"net/http"
"time"
)
func main() {
go func() {
time.AfterFunc(time.Second, func() {
response, _ := http.Get("http://localhost")
resp, _ := ioutil.ReadAll(response.Body)
fmt.Println(string(resp))
})
}()
flygo.GetApp().Get("/", func(ctx *Context) {
ctx.Text("Hello world")
}).Run()
}
Thanks