Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbogem <albertnigma@gmail.com>2016-11-22 01:01:42 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-23 11:13:00 +0300
commit75e55cd06f63bc545c1700cd6904e509fc91093b (patch)
treeaa1effc77857285545c640f1bd1c2e9a3708760f
parente81c06c3f0a6f9a960d91b31960e48a807112655 (diff)
hugolib, source, tpl: Fix docs
See #2014
-rw-r--r--hugolib/pageGroup.go12
-rw-r--r--source/file.go5
-rw-r--r--tpl/template.go2
3 files changed, 12 insertions, 7 deletions
diff --git a/hugolib/pageGroup.go b/hugolib/pageGroup.go
index 814bf3e77..343ecf52e 100644
--- a/hugolib/pageGroup.go
+++ b/hugolib/pageGroup.go
@@ -227,7 +227,8 @@ func (p Pages) groupByDateField(sorter func(p Pages) Pages, formatter func(p *Pa
return r, nil
}
-// GroupByDate groups by the given page's Date value in the given format and with the given order.
+// GroupByDate groups by the given page's Date value in
+// the given format and with the given order.
// Valid values for order is asc, desc, rev and reverse.
// For valid format strings, see https://golang.org/pkg/time/#Time.Format
func (p Pages) GroupByDate(format string, order ...string) (PagesGroup, error) {
@@ -240,7 +241,8 @@ func (p Pages) GroupByDate(format string, order ...string) (PagesGroup, error) {
return p.groupByDateField(sorter, formatter, order...)
}
-// GroupByPublishDate groups by the given page's PublishDate value in the given format and with the given order.
+// GroupByPublishDate groups by the given page's PublishDate value in
+// the given format and with the given order.
// Valid values for order is asc, desc, rev and reverse.
// For valid format strings, see https://golang.org/pkg/time/#Time.Format
func (p Pages) GroupByPublishDate(format string, order ...string) (PagesGroup, error) {
@@ -253,7 +255,8 @@ func (p Pages) GroupByPublishDate(format string, order ...string) (PagesGroup, e
return p.groupByDateField(sorter, formatter, order...)
}
-// GroupByExpireDate groups by the given page's ExpireDate value in the given format and with the given order.
+// GroupByExpiryDate groups by the given page's ExpireDate value in
+// the given format and with the given order.
// Valid values for order is asc, desc, rev and reverse.
// For valid format strings, see https://golang.org/pkg/time/#Time.Format
func (p Pages) GroupByExpiryDate(format string, order ...string) (PagesGroup, error) {
@@ -266,7 +269,8 @@ func (p Pages) GroupByExpiryDate(format string, order ...string) (PagesGroup, er
return p.groupByDateField(sorter, formatter, order...)
}
-// GroupByParamDate groups by a date set as a param on the page in the given format and with the given order.
+// GroupByParamDate groups by a date set as a param on the page in
+// the given format and with the given order.
// Valid values for order is asc, desc, rev and reverse.
// For valid format strings, see https://golang.org/pkg/time/#Time.Format
func (p Pages) GroupByParamDate(key string, format string, order ...string) (PagesGroup, error) {
diff --git a/source/file.go b/source/file.go
index c309bbd03..5877004ca 100644
--- a/source/file.go
+++ b/source/file.go
@@ -54,12 +54,13 @@ func (f *File) Bytes() []byte {
return helpers.ReaderToBytes(f.Contents)
}
-// BaseFileName Filename without extension.
+// BaseFileName is a filename without extension.
func (f *File) BaseFileName() string {
return f.baseName
}
-// Filename with no extension, not even the optional language extension part.
+// TranslationBaseName is a filename with no extension,
+// not even the optional language extension part.
func (f *File) TranslationBaseName() string {
return f.translationBaseName
}
diff --git a/tpl/template.go b/tpl/template.go
index 275ec6b8f..6c5bea9df 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -68,7 +68,7 @@ type GoHTMLTemplate struct {
errors []*templateErr
}
-// The "Global" Template System
+// T is the "global" template system
func T() Template {
if tmpl == nil {
tmpl = New()