diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-09-01 02:20:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 02:20:03 -0600 |
commit | 8bce726c73bb4df8c089e1f49e8f605b8919277c (patch) | |
tree | edd095cd3cbb742127f036639528ce9255ec212e /docs/src | |
parent | 69f1bb86908c17303277051491f1f160909b9896 (diff) | |
parent | 6a9f86e1dea6be32d15f2ec520abc1fcfe78ad9e (diff) |
Merge pull request #189 from ponzu-cms/ponzu-dev
[docs] sync docs after Push method example update
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/References/Overview.md | 6 |
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! --- |