all: Fix typos in function names and comments

This commit is contained in:
Oleksandr Redko
2023-05-22 20:11:12 +03:00
committed by Bjørn Erik Pedersen
parent 12dc9a6e4a
commit 9009c8cdca
27 changed files with 41 additions and 41 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -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)