From a9b5ac4df2e92bd7367235c596f46a4b6f023a31 Mon Sep 17 00:00:00 2001 From: Nikita Tokarchuk Date: Thu, 16 Dec 2021 21:34:44 +0100 Subject: [PATCH] Add more docs --- frontend/ghost/ghost.go | 3 +++ frontend/templates/funcs.go | 1 + 2 files changed, 4 insertions(+) diff --git a/frontend/ghost/ghost.go b/frontend/ghost/ghost.go index fb59855..feaa79a 100644 --- a/frontend/ghost/ghost.go +++ b/frontend/ghost/ghost.go @@ -4,7 +4,10 @@ package ghost // Client is the ghost backend client type Client interface { + // GetPosts returns blog posts according to query params GetPosts(queryParams ...Modifier) (posts *Posts, err error) + // GetPostBySlug returns a single post by its slug title and query params GetPostBySlug(slug string, queryParams ...Modifier) (posts *Posts, err error) + // GetPageBySlug returns a single page by its slug title and query params GetPageBySlug(slug string, queryParams ...Modifier) (pages *Pages, err error) } diff --git a/frontend/templates/funcs.go b/frontend/templates/funcs.go index 7320b38..aedbf17 100644 --- a/frontend/templates/funcs.go +++ b/frontend/templates/funcs.go @@ -2,6 +2,7 @@ package templates import "html/template" +// UseFuncs returns a func map with template helpers functions func UseFuncs() template.FuncMap { return template.FuncMap{ "add": func(i int) int {