From 46ac7453743f0bd889d0be3505bde2521f9f0336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 7 Aug 2017 20:19:24 +0200 Subject: [PATCH] all: Fix spelling And some other minor issues. --- create/content_template_handler.go | 2 +- hugolib/handler_base.go | 4 ++-- hugolib/hugo_sites.go | 1 - media/mediaType_test.go | 2 +- output/outputFormat_test.go | 2 +- releaser/releaser.go | 2 +- tpl/internal/templatefuncsRegistry.go | 2 +- tpl/math/math.go | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/create/content_template_handler.go b/create/content_template_handler.go index 286184c2bf4..d73c52a243f 100644 --- a/create/content_template_handler.go +++ b/create/content_template_handler.go @@ -49,7 +49,7 @@ type ArchetypeFileData struct { } const ( - // ArchetypeTemplateTemplate is used as inital template when adding an archetype template. + // ArchetypeTemplateTemplate is used as initial template when adding an archetype template. ArchetypeTemplateTemplate = `--- title: "{{ replace .TranslationBaseName "-" " " | title }}" date: {{ .Date }} diff --git a/hugolib/handler_base.go b/hugolib/handler_base.go index 10698ea7a06..d7e4a63a324 100644 --- a/hugolib/handler_base.go +++ b/hugolib/handler_base.go @@ -25,12 +25,12 @@ type Handler interface { Extensions() []string } -// Handle identifies functionality assosiated with certain file extentions. +// Handle identifies functionality associated with certain file extensions. type Handle struct { extensions []string } -// Extensions returns a list of extentions. +// Extensions returns a list of extensions. func (h Handle) Extensions() []string { return h.extensions } diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index c3829fb1d1d..e763588bd65 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -381,7 +381,6 @@ func (h *HugoSites) createMissingPages() error { } if !foundTaxonomyTermsPage { - foundTaxonomyTermsPage = true n := s.newTaxonomyTermsPage(plural) s.Pages = append(s.Pages, n) newPages = append(newPages, n) diff --git a/media/mediaType_test.go b/media/mediaType_test.go index ffef07b80aa..0cdecdeb11c 100644 --- a/media/mediaType_test.go +++ b/media/mediaType_test.go @@ -73,7 +73,7 @@ func TestFromTypeString(t *testing.T) { require.NoError(t, err) require.Equal(t, Type{MainType: "application", SubType: "custom", Suffix: "pdf", Delimiter: defaultDelimiter}, f) - f, err = FromString("noslash") + _, err = FromString("noslash") require.Error(t, err) } diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go index 9033de869c6..b800d1a360e 100644 --- a/output/outputFormat_test.go +++ b/output/outputFormat_test.go @@ -127,7 +127,7 @@ func TestGetFormatByFilename(t *testing.T) { f, found = formats.FromFilename("my.nex") require.True(t, found) require.Equal(t, noExt, f) - f, found = formats.FromFilename("my.css") + _, found = formats.FromFilename("my.css") require.False(t, found) } diff --git a/releaser/releaser.go b/releaser/releaser.go index 4da767949fc..d0568303362 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -121,7 +121,7 @@ func (r *ReleaseHandler) Run() error { var changeLogFromTag string if newVersion.PatchLevel == 0 { - // There may have been patch releases inbetween, so set the tag explicitly. + // There may have been patch releases between, so set the tag explicitly. changeLogFromTag = "v" + newVersion.Prev().String() exists, _ := tagExists(changeLogFromTag) if !exists { diff --git a/tpl/internal/templatefuncsRegistry.go b/tpl/internal/templatefuncsRegistry.go index 85d8c0b3bcf..0f11be65c46 100644 --- a/tpl/internal/templatefuncsRegistry.go +++ b/tpl/internal/templatefuncsRegistry.go @@ -84,7 +84,7 @@ type TemplateFuncMethodMapping struct { Method interface{} // Any template funcs aliases. This is mainly motivated by keeping - // backwards compability, but some new template funcs may also make + // backwards compatibility, but some new template funcs may also make // sense to give short and snappy aliases. // Note that these aliases are global and will be merged, so the last // key will win. diff --git a/tpl/math/math.go b/tpl/math/math.go index f45488166ac..5ddc3eb9c20 100644 --- a/tpl/math/math.go +++ b/tpl/math/math.go @@ -92,7 +92,7 @@ func (ns *Namespace) Mul(a, b interface{}) (interface{}, error) { return DoArithmetic(a, b, '*') } -// Sub substracts two numbers. +// Sub subtracts two numbers. func (ns *Namespace) Sub(a, b interface{}) (interface{}, error) { return DoArithmetic(a, b, '-') }