From 81c13171a985b89f2af6682dbd1d4b8766cb9af7 Mon Sep 17 00:00:00 2001 From: Jorin Vogel Date: Wed, 2 Aug 2017 14:25:05 +0200 Subject: Add some missing doc comments As pointed out by the linter, some exported functions and types are missing doc comments. The linter warnings have been reduced from 194 to 116. Not all missing comments have been added in this commit though. --- hugolib/handler_base.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hugolib/handler_base.go') diff --git a/hugolib/handler_base.go b/hugolib/handler_base.go index 99c15e15d..10698ea7a 100644 --- a/hugolib/handler_base.go +++ b/hugolib/handler_base.go @@ -17,6 +17,7 @@ import ( "github.com/gohugoio/hugo/source" ) +// Handler is used for processing files of a specific type. type Handler interface { FileConvert(*source.File, *Site) HandledResult PageConvert(*Page) HandledResult @@ -24,14 +25,17 @@ type Handler interface { Extensions() []string } +// Handle identifies functionality assosiated with certain file extentions. type Handle struct { extensions []string } +// Extensions returns a list of extentions. func (h Handle) Extensions() []string { return h.extensions } +// HandledResult describes the results of a file handling operation. type HandledResult struct { page *Page file *source.File @@ -55,6 +59,7 @@ func (h HandledResult) String() string { return h.Error() } +// Page returns the affected page. func (h HandledResult) Page() *Page { return h.page } -- cgit v1.2.3