From 6a9f86e1dea6be32d15f2ec520abc1fcfe78ad9e Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Fri, 1 Sep 2017 02:18:22 -0600 Subject: sync docs after Push method example update --- docs/src/References/Overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/src') 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! --- -- cgit v1.2.3