Skip to content
This repository was archived by the owner on Mar 21, 2019. It is now read-only.

Commit c19db84

Browse files
committed
improved docs
1 parent 3ba15df commit c19db84

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ type XsrfAction struct {
1515
xsrf.Checker
1616
}
1717

18-
func (x *XsrfAction) Get() {
19-
x.RenderFile("test.html", render.T{
18+
func (x *XsrfAction) Get() error {
19+
return x.Render("test.html", render.T{
2020
"XsrfFormHtml": x.XsrfFormHtml(),
2121
})
2222
}
2323

2424
func (x *XsrfAction) Post() {
25-
// before this call, xsrf will be checked
25+
// xsrf will be checked before this being called
2626
}
2727

2828
func main() {
@@ -37,5 +37,9 @@ If you don't want some action do not check, then
3737
type NoCheckAction struct {
3838
xsrf.NoCheck
3939
}
40+
41+
func (x *NoCheckAction) Post() {
42+
// xsrf will NOT be checked before this being called
43+
}
4044
```
4145
will be ok.

0 commit comments

Comments
 (0)