summaryrefslogtreecommitdiff
path: root/docs/src/References/Overview.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/References/Overview.md')
-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!
---