herotemplate

command
v11.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Code generated by hero.
Code generated by hero.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL