summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Oliff <christianoliff@pm.me>2024-02-11 20:51:33 +0900
committerGitHub <noreply@github.com>2024-02-11 13:51:33 +0200
commit0672b5c76605132475ff18b8c526f1cf0d6affc3 (patch)
tree2af2eb9d8eb1458ed6c39b58328c7d21d0c522d2
parente309f82efe1885aa5b8030be48c36ba4432ddd7b (diff)
all: Fix typos
-rw-r--r--output/outputFormat.go4
-rw-r--r--resources/internal/resourcepaths.go2
-rw-r--r--resources/page/permalinks.go4
-rw-r--r--resources/page/site.go2
-rw-r--r--resources/resource.go2
-rw-r--r--resources/resource_spec.go2
-rw-r--r--tpl/collections/collections.go2
-rw-r--r--tpl/fmt/fmt.go6
-rw-r--r--tpl/internal/resourcehelpers/helpers.go2
-rw-r--r--watcher/filenotify/poller.go2
-rwxr-xr-xwatchtestscripts.sh2
11 files changed, 15 insertions, 15 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go
index 981d895b6..d249c72b9 100644
--- a/output/outputFormat.go
+++ b/output/outputFormat.go
@@ -72,10 +72,10 @@ type Format struct {
// Setting this will make this output format control the value of
// .Permalink and .RelPermalink for a rendered Page.
// If not set, these values will point to the main (first) output format
- // configured. That is probably the behaviour you want in most situations,
+ // configured. That is probably the behavior you want in most situations,
// as you probably don't want to link back to the RSS version of a page, as an
// example. AMP would, however, be a good example of an output format where this
- // behaviour is wanted.
+ // behavior is wanted.
Permalinkable bool `json:"permalinkable"`
// Setting this to a non-zero value will be used as the first sort criteria.
diff --git a/resources/internal/resourcepaths.go b/resources/internal/resourcepaths.go
index 21c65e2ca..71d3538dd 100644
--- a/resources/internal/resourcepaths.go
+++ b/resources/internal/resourcepaths.go
@@ -21,7 +21,7 @@ import (
"github.com/gohugoio/hugo/common/paths"
)
-// ResourcePaths holds path information for a resouce.
+// ResourcePaths holds path information for a resource.
// All directories in here have Unix-style slashes, with leading slash, but no trailing slash.
// Empty directories are represented with an empty string.
type ResourcePaths struct {
diff --git a/resources/page/permalinks.go b/resources/page/permalinks.go
index 1677d3a90..67c63c4b2 100644
--- a/resources/page/permalinks.go
+++ b/resources/page/permalinks.go
@@ -30,7 +30,7 @@ import (
"github.com/gohugoio/hugo/resources/kinds"
)
-// PermalinkExpander holds permalin mappings per section.
+// PermalinkExpander holds permalink mappings per section.
type PermalinkExpander struct {
// knownPermalinkAttributes maps :tags in a permalink specification to a
// function which, given a page and the tag, returns the resulting string
@@ -422,7 +422,7 @@ func DecodePermalinksConfig(m map[string]any) (map[string]map[string]string, err
// [permalinks]
// key = '...'
- // To sucessfully be backward compatible, "default" patterns need to be set for both page and term
+ // To successfully be backward compatible, "default" patterns need to be set for both page and term
permalinksConfig[kinds.KindPage][k] = v
permalinksConfig[kinds.KindTerm][k] = v
diff --git a/resources/page/site.go b/resources/page/site.go
index f2118a3b2..132ab9fe8 100644
--- a/resources/page/site.go
+++ b/resources/page/site.go
@@ -29,7 +29,7 @@ import (
"github.com/gohugoio/hugo/navigation"
)
-// Site represents a site. There can be multople sites in a multilingual setup.
+// Site represents a site. There can be multiple sites in a multilingual setup.
type Site interface {
// Returns the Language configured for this Site.
Language() *langs.Language
diff --git a/resources/resource.go b/resources/resource.go
index c11756bca..900b05a5f 100644
--- a/resources/resource.go
+++ b/resources/resource.go
@@ -85,7 +85,7 @@ type ResourceSourceDescriptor struct {
// Set when its known up front, else it's resolved from the target filename.
MediaType media.Type
- // Used to track depenencies (e.g. imports). May be nil if that's of no concern.
+ // Used to track dependencies (e.g. imports). May be nil if that's of no concern.
DependencyManager identity.Manager
// A shared identity for this resource and all its clones.
diff --git a/resources/resource_spec.go b/resources/resource_spec.go
index 5fdcdd831..0bb507083 100644
--- a/resources/resource_spec.go
+++ b/resources/resource_spec.go
@@ -126,7 +126,7 @@ type Spec struct {
*SpecCommon
}
-// The parts of Spec that's comoon for all sites.
+// The parts of Spec that's common for all sites.
type SpecCommon struct {
incr identity.Incrementer
ResourceCache *ResourceCache
diff --git a/tpl/collections/collections.go b/tpl/collections/collections.go
index 61fd138e9..2107cf5a0 100644
--- a/tpl/collections/collections.go
+++ b/tpl/collections/collections.go
@@ -572,7 +572,7 @@ func (ns *Namespace) Seq(args ...any) ([]int, error) {
return seq, nil
}
-// Shuffle returns list l in a randomised order.
+// Shuffle returns list l in a randomized order.
func (ns *Namespace) Shuffle(l any) (any, error) {
if l == nil {
return nil, errors.New("both count and seq must be provided")
diff --git a/tpl/fmt/fmt.go b/tpl/fmt/fmt.go
index 04dbd339c..e9c18360a 100644
--- a/tpl/fmt/fmt.go
+++ b/tpl/fmt/fmt.go
@@ -47,7 +47,7 @@ func (ns *Namespace) Print(args ...any) string {
return _fmt.Sprint(args...)
}
-// Printf returns string representation of args formatted with the layouut in format.
+// Printf returns string representation of args formatted with the layout in format.
func (ns *Namespace) Printf(format string, args ...any) string {
return _fmt.Sprintf(format, args...)
}
@@ -87,12 +87,12 @@ func (ns *Namespace) Warnidf(id, format string, args ...any) string {
return ""
}
-// Warnmf is epxermimental and subject to change at any time.
+// Warnmf is experimental and subject to change at any time.
func (ns *Namespace) Warnmf(m any, format string, args ...any) string {
return ns.logmf(ns.logger.Warn(), m, format, args...)
}
-// Errormf is epxermimental and subject to change at any time.
+// Errormf is experimental and subject to change at any time.
func (ns *Namespace) Errormf(m any, format string, args ...any) string {
return ns.logmf(ns.logger.Error(), m, format, args...)
}
diff --git a/tpl/internal/resourcehelpers/helpers.go b/tpl/internal/resourcehelpers/helpers.go
index 2d50c59a4..a777c8c3b 100644
--- a/tpl/internal/resourcehelpers/helpers.go
+++ b/tpl/internal/resourcehelpers/helpers.go
@@ -38,7 +38,7 @@ func ResolveIfFirstArgIsString(args []any) (resources.ResourceTransformer, strin
return v2, v1, ok2
}
-// This roundabout way of doing it is needed to get both pipeline behaviour and options as arguments.
+// This roundabout way of doing it is needed to get both pipeline behavior and options as arguments.
func ResolveArgs(args []any) (resources.ResourceTransformer, map[string]any, error) {
if len(args) == 0 {
return nil, nil, errors.New("no Resource provided in transformation")
diff --git a/watcher/filenotify/poller.go b/watcher/filenotify/poller.go
index cedb5d079..5bf07c8f1 100644
--- a/watcher/filenotify/poller.go
+++ b/watcher/filenotify/poller.go
@@ -201,7 +201,7 @@ func (r *recording) record(filename string) error {
r.FileInfo = fi
// If fi is a dir, we watch the files inside that directory (not recursively).
- // This matches the behaviour of fsnotity.
+ // This matches the behavior of fsnotity.
if fi.IsDir() {
f, err := os.Open(filename)
if err != nil {
diff --git a/watchtestscripts.sh b/watchtestscripts.sh
index 2f6be079e..bf61d0cc3 100755
--- a/watchtestscripts.sh
+++ b/watchtestscripts.sh
@@ -3,5 +3,5 @@
trap exit SIGINT
# I use "run tests on save" in my editor.
-# Unfortantly, changes to text files does not trigger this. Hence this workaround.
+# Unfortunately, changes to text files does not trigger this. Hence this workaround.
while true; do find testscripts -type f -name "*.txt" | entr -pd touch main_test.go; done \ No newline at end of file