summaryrefslogtreecommitdiffstats
path: root/hugofs
diff options
context:
space:
mode:
authorOleksandr Redko <Oleksandr_Redko@epam.com>2023-05-22 20:11:12 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-06-19 09:26:29 +0200
commit9009c8cdca448e50704f7ecd1a3918c5919b0f37 (patch)
tree960aaa2b80a07c959360ad66fc79ebe7c0fa9632 /hugofs
parent12dc9a6e4acd5280a3e8b1658cbb96669fa97057 (diff)
all: Fix typos in function names and comments
Diffstat (limited to 'hugofs')
-rw-r--r--hugofs/filter_fs.go4
-rw-r--r--hugofs/fs.go2
-rw-r--r--hugofs/glob/filename_filter_test.go8
3 files changed, 7 insertions, 7 deletions
diff --git a/hugofs/filter_fs.go b/hugofs/filter_fs.go
index 351b4d0f7..1b020738a 100644
--- a/hugofs/filter_fs.go
+++ b/hugofs/filter_fs.go
@@ -92,7 +92,7 @@ func NewLanguageFs(langs map[string]int, fs afero.Fs) (afero.Fs, error) {
fim := fi.(FileMetaInfo)
langs := translations[fim.Meta().TranslationBaseNameWithExt]
if len(langs) > 0 {
- fim.Meta().Translations = sortAndremoveStringDuplicates(langs)
+ fim.Meta().Translations = sortAndRemoveStringDuplicates(langs)
}
}
}
@@ -328,7 +328,7 @@ func printFs(fs afero.Fs, path string, w io.Writer) {
})
}
-func sortAndremoveStringDuplicates(s []string) []string {
+func sortAndRemoveStringDuplicates(s []string) []string {
ss := sort.StringSlice(s)
ss.Sort()
i := 0
diff --git a/hugofs/fs.go b/hugofs/fs.go
index ce92a626d..9462afa24 100644
--- a/hugofs/fs.go
+++ b/hugofs/fs.go
@@ -175,7 +175,7 @@ func MakeReadableAndRemoveAllModulePkgDir(fs afero.Fs, dir string) (int, error)
}
// IsOsFs returns whether fs is an OsFs or if it fs wraps an OsFs.
-// TODO(bep) make this nore robust.
+// TODO(bep) make this more robust.
func IsOsFs(fs afero.Fs) bool {
var isOsFs bool
WalkFilesystems(fs, func(fs afero.Fs) bool {
diff --git a/hugofs/glob/filename_filter_test.go b/hugofs/glob/filename_filter_test.go
index b74982ef3..8437af858 100644
--- a/hugofs/glob/filename_filter_test.go
+++ b/hugofs/glob/filename_filter_test.go
@@ -59,11 +59,11 @@ func TestFilenameFilter(t *testing.T) {
c.Assert(includeOnlyFilter.Match("ab.jpg", false), qt.Equals, true)
c.Assert(includeOnlyFilter.Match("ab.gif", false), qt.Equals, false)
- exlcudeOnlyFilter, err := NewFilenameFilter(nil, []string{"**.json", "**.jpg"})
+ excludeOnlyFilter, err := NewFilenameFilter(nil, []string{"**.json", "**.jpg"})
c.Assert(err, qt.IsNil)
- c.Assert(exlcudeOnlyFilter.Match("ab.json", false), qt.Equals, false)
- c.Assert(exlcudeOnlyFilter.Match("ab.jpg", false), qt.Equals, false)
- c.Assert(exlcudeOnlyFilter.Match("ab.gif", false), qt.Equals, true)
+ c.Assert(excludeOnlyFilter.Match("ab.json", false), qt.Equals, false)
+ c.Assert(excludeOnlyFilter.Match("ab.jpg", false), qt.Equals, false)
+ c.Assert(excludeOnlyFilter.Match("ab.gif", false), qt.Equals, true)
var nilFilter *FilenameFilter
c.Assert(nilFilter.Match("ab.gif", false), qt.Equals, true)