mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
d697426cb6
Change the new ctx.Compres to ctx.CompressWriter and iris.Compress and iris.CompressReader as one iris.Compression Update the README example (master development branch) Former-commit-id: fb67858fe5be5662b5816df41020c28ff9a8c6f6 |
||
---|---|---|
.. | ||
template | ||
app.go | ||
README.md |
Hero Template Example
This folder contains the iris version of the original hero's example: https://github.com/shiyanhui/hero/tree/master/examples/app.
Iris is 100% compatible with net/http
so you don't have to change anything else
except the handler input from the original example.
The only inline handler's changes were:
From:
if _, err := w.Write(buffer.Bytes()); err != nil {
// and
template.UserListToWriter(userList, w)
To:
if _, err := ctx.Write(buffer.Bytes()); err != nil {
// and
template.UserListToWriter(userList, ctx)
So easy.
Read more at: https://github.com/shiyanhui/hero