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:
authorCameron Moore <moorereason@gmail.com>2018-09-06 22:57:58 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-07 09:25:51 +0300
commit7231869ba87f4e8d08e94dce18f20b7ed4fa2e15 (patch)
tree5fe3116880722bc415dfd5909c0ac7dbf224d624 /related
parentccd32854845030179dd74293b8c518c6a7e3f39c (diff)
related: Fix golint issues
related/inverted_index.go:76:1: exported method Config.Add should have comment or be unexported related/inverted_index.go:255:1: exported method IndexConfig.ToKeywords should have comment or be unexported
Diffstat (limited to 'related')
-rw-r--r--related/inverted_index.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/related/inverted_index.go b/related/inverted_index.go
index 4f0dba7d6..309eb4097 100644
--- a/related/inverted_index.go
+++ b/related/inverted_index.go
@@ -73,6 +73,7 @@ type Config struct {
Indices IndexConfigs
}
+// Add adds a given index.
func (c *Config) Add(index IndexConfig) {
if c.ToLower {
index.ToLower = true
@@ -252,6 +253,7 @@ func (idx *InvertedIndex) SearchDoc(doc Document, indices ...string) ([]Document
return idx.searchDate(doc.PubDate(), q...)
}
+// ToKeywords returns a Keyword slice of the given input.
func (cfg IndexConfig) ToKeywords(v interface{}) ([]Keyword, error) {
var (
keywords []Keyword
@@ -279,7 +281,7 @@ func (cfg IndexConfig) ToKeywords(v interface{}) ([]Keyword, error) {
case nil:
return keywords, nil
default:
- return keywords, fmt.Errorf("indexing currently not supported for for index %q and type %T", cfg.Name, vv)
+ return keywords, fmt.Errorf("indexing currently not supported for index %q and type %T", cfg.Name, vv)
}
return keywords, nil