This repository contains the restful types context's rendering for Iris web framework and fasthttp. The idea of this came from unrolled/render, which I had the time to convert it for fasthttp & iris & improve even more its performance and usability.
// small example for json rendering, same for all other
package main
import (
"github.com/kataras/iris"
)
func main() {
iris.Get("/hi_json", func(ctx *iris.Context) {
ctx.JSON(iris.StatusOK, iris.Map{
"Name": "Iris",
"Age": 2,
}) // ctx.XML, ctx.Data, ctx.Text, ctx.JSONP...
})
iris.Listen(":8080")
}
This project is licensed under the MIT License.
License can be found here.