all: Fix spelling

And some other minor issues.
This commit is contained in:
Bjørn Erik Pedersen 2017-08-07 20:19:24 +02:00
parent 4b54fb0701
commit 46ac745374
8 changed files with 8 additions and 9 deletions

View file

@ -49,7 +49,7 @@ type ArchetypeFileData struct {
} }
const ( const (
// ArchetypeTemplateTemplate is used as inital template when adding an archetype template. // ArchetypeTemplateTemplate is used as initial template when adding an archetype template.
ArchetypeTemplateTemplate = `--- ArchetypeTemplateTemplate = `---
title: "{{ replace .TranslationBaseName "-" " " | title }}" title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }} date: {{ .Date }}

View file

@ -25,12 +25,12 @@ type Handler interface {
Extensions() []string Extensions() []string
} }
// Handle identifies functionality assosiated with certain file extentions. // Handle identifies functionality associated with certain file extensions.
type Handle struct { type Handle struct {
extensions []string extensions []string
} }
// Extensions returns a list of extentions. // Extensions returns a list of extensions.
func (h Handle) Extensions() []string { func (h Handle) Extensions() []string {
return h.extensions return h.extensions
} }

View file

@ -381,7 +381,6 @@ func (h *HugoSites) createMissingPages() error {
} }
if !foundTaxonomyTermsPage { if !foundTaxonomyTermsPage {
foundTaxonomyTermsPage = true
n := s.newTaxonomyTermsPage(plural) n := s.newTaxonomyTermsPage(plural)
s.Pages = append(s.Pages, n) s.Pages = append(s.Pages, n)
newPages = append(newPages, n) newPages = append(newPages, n)

View file

@ -73,7 +73,7 @@ func TestFromTypeString(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, Type{MainType: "application", SubType: "custom", Suffix: "pdf", Delimiter: defaultDelimiter}, f) require.Equal(t, Type{MainType: "application", SubType: "custom", Suffix: "pdf", Delimiter: defaultDelimiter}, f)
f, err = FromString("noslash") _, err = FromString("noslash")
require.Error(t, err) require.Error(t, err)
} }

View file

@ -127,7 +127,7 @@ func TestGetFormatByFilename(t *testing.T) {
f, found = formats.FromFilename("my.nex") f, found = formats.FromFilename("my.nex")
require.True(t, found) require.True(t, found)
require.Equal(t, noExt, f) require.Equal(t, noExt, f)
f, found = formats.FromFilename("my.css") _, found = formats.FromFilename("my.css")
require.False(t, found) require.False(t, found)
} }

View file

@ -121,7 +121,7 @@ func (r *ReleaseHandler) Run() error {
var changeLogFromTag string var changeLogFromTag string
if newVersion.PatchLevel == 0 { 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() changeLogFromTag = "v" + newVersion.Prev().String()
exists, _ := tagExists(changeLogFromTag) exists, _ := tagExists(changeLogFromTag)
if !exists { if !exists {

View file

@ -84,7 +84,7 @@ type TemplateFuncMethodMapping struct {
Method interface{} Method interface{}
// Any template funcs aliases. This is mainly motivated by keeping // 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. // sense to give short and snappy aliases.
// Note that these aliases are global and will be merged, so the last // Note that these aliases are global and will be merged, so the last
// key will win. // key will win.

View file

@ -92,7 +92,7 @@ func (ns *Namespace) Mul(a, b interface{}) (interface{}, error) {
return DoArithmetic(a, b, '*') return DoArithmetic(a, b, '*')
} }
// Sub substracts two numbers. // Sub subtracts two numbers.
func (ns *Namespace) Sub(a, b interface{}) (interface{}, error) { func (ns *Namespace) Sub(a, b interface{}) (interface{}, error) {
return DoArithmetic(a, b, '-') return DoArithmetic(a, b, '-')
} }