all: Fix minor typos

This commit is contained in:
Phil Davis
2020-12-16 16:56:32 +05:45
committed by GitHub
parent 21fa1e86f2
commit 04b89857e1
67 changed files with 124 additions and 124 deletions

View File

@@ -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 {

View File

@@ -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".

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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()