Skip to content

Commit

Permalink
all: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
coliff committed Feb 11, 2024
1 parent e309f82 commit 0672b5c
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions output/outputFormat.go
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion resources/internal/resourcepaths.go
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions resources/page/permalinks.go
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion resources/page/site.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resources/resource.go
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion resources/resource_spec.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tpl/collections/collections.go
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions tpl/fmt/fmt.go
Expand Up @@ -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...)
}
Expand Down Expand Up @@ -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...)
}
Expand Down
2 changes: 1 addition & 1 deletion tpl/internal/resourcehelpers/helpers.go
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion watcher/filenotify/poller.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion watchtestscripts.sh
Expand Up @@ -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

0 comments on commit 0672b5c

Please sign in to comment.