diff options
author | Phil Davis <phil@jankaritech.com> | 2020-12-16 14:11:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 14:11:32 +0300 |
commit | 04b89857e104ac7dcbf9fc65d8d4f1a1178123e6 (patch) | |
tree | 585bf761f0a1cfc69dffcd8afd22e94ca9da7c07 /resources/page | |
parent | 21fa1e86f2aa929fb0983a0cc3dc4e271ea1cc54 (diff) |
all: Fix minor typos
Diffstat (limited to 'resources/page')
-rw-r--r-- | resources/page/page_generate/generate_page_wrappers.go | 8 | ||||
-rw-r--r-- | resources/page/page_outputformat.go | 2 | ||||
-rw-r--r-- | resources/page/pagegroup.go | 4 | ||||
-rw-r--r-- | resources/page/pages.go | 2 | ||||
-rw-r--r-- | resources/page/pages_prev_next.go | 2 | ||||
-rw-r--r-- | resources/page/pages_related.go | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/resources/page/page_generate/generate_page_wrappers.go b/resources/page/page_generate/generate_page_wrappers.go index ff3744c20..e1d83115b 100644 --- a/resources/page/page_generate/generate_page_wrappers.go +++ b/resources/page/page_generate/generate_page_wrappers.go @@ -81,7 +81,7 @@ func generateMarshalJSON(c *codegen.Inspector) error { // Exclude these methods excludes := []reflect.Type{ - // We need to eveluate the deprecated vs JSON in the future, + // We need to evaluate the deprecated vs JSON in the future, // but leave them out for now. pageInterfaceDeprecated, @@ -146,7 +146,7 @@ func generateDeprecatedWrappers(c *codegen.Inspector) error { "Hugo": "Use the global hugo function.", "LanguagePrefix": "Use .Site.LanguagePrefix.", "GetParam": "Use .Param or .Params.myParam.", - "RSSLink": `Use the Output Format's link, e.g. something like: + "RSSLink": `Use the Output Format's link, e.g. something like: {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}`, "URL": "Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url", } @@ -244,8 +244,8 @@ package page %s // ZeroFile represents a zero value of source.File with warnings if invoked. -type zeroFile struct { - log *helpers.DistinctLogger +type zeroFile struct { + log *helpers.DistinctLogger } func NewZeroFile(log *helpers.DistinctLogger) source.File { diff --git a/resources/page/page_outputformat.go b/resources/page/page_outputformat.go index ff4213cc4..9eed8241e 100644 --- a/resources/page/page_outputformat.go +++ b/resources/page/page_outputformat.go @@ -27,7 +27,7 @@ type OutputFormats []OutputFormat // OutputFormat links to a representation of a resource. type OutputFormat struct { - // Rel constains a value that can be used to construct a rel link. + // Rel contains a value that can be used to construct a rel link. // This is value is fetched from the output format definition. // Note that for pages with only one output format, // this method will always return "canonical". diff --git a/resources/page/pagegroup.go b/resources/page/pagegroup.go index 07ccbfedd..d4ca8ca41 100644 --- a/resources/page/pagegroup.go +++ b/resources/page/pagegroup.go @@ -343,7 +343,7 @@ func (p Pages) GroupByParamDate(key string, format string, order ...string) (Pag return p.groupByDateField(sorter, formatter, order...) } -// ProbablyEq wraps comare.ProbablyEqer +// ProbablyEq wraps compare.ProbablyEqer func (p PageGroup) ProbablyEq(other interface{}) bool { otherP, ok := other.(PageGroup) if !ok { @@ -387,7 +387,7 @@ func (psg PagesGroup) Len() int { return l } -// ProbablyEq wraps comare.ProbablyEqer +// ProbablyEq wraps compare.ProbablyEqer func (psg PagesGroup) ProbablyEq(other interface{}) bool { otherPsg, ok := other.(PagesGroup) if !ok { diff --git a/resources/page/pages.go b/resources/page/pages.go index ac69a8079..dff784f5c 100644 --- a/resources/page/pages.go +++ b/resources/page/pages.go @@ -104,7 +104,7 @@ func (p Pages) Len() int { return len(p) } -// ProbablyEq wraps comare.ProbablyEqer +// ProbablyEq wraps compare.ProbablyEqer func (pages Pages) ProbablyEq(other interface{}) bool { otherPages, ok := other.(Pages) if !ok { diff --git a/resources/page/pages_prev_next.go b/resources/page/pages_prev_next.go index f30a55da5..753a3e415 100644 --- a/resources/page/pages_prev_next.go +++ b/resources/page/pages_prev_next.go @@ -13,7 +13,7 @@ package page -// Next returns the next page reletive to the given +// Next returns the next page relative to the given func (p Pages) Next(cur Page) Page { x := searchPage(cur, p) if x <= 0 { diff --git a/resources/page/pages_related.go b/resources/page/pages_related.go index 026026572..bc3b8b55a 100644 --- a/resources/page/pages_related.go +++ b/resources/page/pages_related.go @@ -108,7 +108,7 @@ func (p Pages) withInvertedIndex(search func(idx *related.InvertedIndex) ([]rela d, ok := p[0].(InternalDependencies) if !ok { - return nil, errors.Errorf("invalid type %T in related serch", p[0]) + return nil, errors.Errorf("invalid type %T in related search", p[0]) } cache := d.GetRelatedDocsHandler() |