summaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-09-01 02:18:22 -0600
committerSteve Manuel <nilslice@gmail.com>2017-09-01 02:18:22 -0600
commit6a9f86e1dea6be32d15f2ec520abc1fcfe78ad9e (patch)
treeedd095cd3cbb742127f036639528ce9255ec212e /docs/src
parent69f1bb86908c17303277051491f1f160909b9896 (diff)
sync docs after Push method example update
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/References/Overview.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/src/References/Overview.md b/docs/src/References/Overview.md
index 8f5e40e..cdbc541 100644
--- a/docs/src/References/Overview.md
+++ b/docs/src/References/Overview.md
@@ -181,13 +181,13 @@ type Book struct {
}
-func (b *Book) Push() []string {
+func (b *Book) Push(res http.ResponseWriter, req *http.Request) ([]string, error) {
return []string{
// the json struct tag is used to tell the server which
// field(s) it should push - only URL paths originating
// from your server can be pushed!
"author",
- }
+ }, nil
}
...
```
@@ -200,7 +200,7 @@ has been made.
!!! note "What else can I Push?"
Only fields that are URL paths originating from your server can be pushed.
This means that you could also implement `item.Pushable` on the `Author`
- type, and return `[]string{"photo"}` to push the Author's image!
+ type, and return `[]string{"photo"}, nil` to push the Author's image!
---