From 18d80d93a4e06c3958895647b69bd761bd64c65f Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 8 Nov 2016 17:34:05 -0800 Subject: changing pointer to value receiever for Item so there is no confusion around ability to change Item fields in Hook --- content/item.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'content') diff --git a/content/item.go b/content/item.go index cbf38af..0bb3800 100644 --- a/content/item.go +++ b/content/item.go @@ -36,32 +36,32 @@ func (i *Item) SetItemID(id int) { } // BeforeSave is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) BeforeSave(req *http.Request) error { +func (i Item) BeforeSave(req *http.Request) error { return nil } // AfterSave is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) AfterSave(req *http.Request) error { +func (i Item) AfterSave(req *http.Request) error { return nil } // BeforeDelete is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) BeforeDelete(req *http.Request) error { +func (i Item) BeforeDelete(req *http.Request) error { return nil } // AfterDelete is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) AfterDelete(req *http.Request) error { +func (i Item) AfterDelete(req *http.Request) error { return nil } // BeforeReject is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) BeforeReject(req *http.Request) error { +func (i Item) BeforeReject(req *http.Request) error { return nil } // AfterReject is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) AfterReject(req *http.Request) error { +func (i Item) AfterReject(req *http.Request) error { return nil } -- cgit v1.3