From 39043005c316569c92b8583a4a33b3eecc682135 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 25 Apr 2023 16:07:43 +0800 Subject: [PATCH] fix some comments Signed-off-by: cui fliter --- helpers/general.go | 2 +- hugofs/glob/glob_test.go | 4 ++-- hugolib/pagecollections.go | 2 +- identity/identity.go | 2 +- lazy/init.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/helpers/general.go b/helpers/general.go index 9203762276d..e9e183b512e 100644 --- a/helpers/general.go +++ b/helpers/general.go @@ -131,7 +131,7 @@ func UniqueStringsReuse(s []string) []string { return result } -// UniqueStringsReuse returns a sorted slice with any duplicates removed. +// UniqueStringsSorted returns a sorted slice with any duplicates removed. // It will modify the input slice. func UniqueStringsSorted(s []string) []string { if len(s) == 0 { diff --git a/hugofs/glob/glob_test.go b/hugofs/glob/glob_test.go index d40e16edce7..454fb850a1d 100644 --- a/hugofs/glob/glob_test.go +++ b/hugofs/glob/glob_test.go @@ -89,8 +89,8 @@ func BenchmarkGetGlob(b *testing.B) { } runBench("Default cache", defaultGlobCache, "abcde") - runBench("Filenames cache, lowercase searchs", defaultGlobCache, "abcde") - runBench("Filenames cache, mixed case searchs", defaultGlobCache, "abCDe") + runBench("Filenames cache, lowercase searches", defaultGlobCache, "abcde") + runBench("Filenames cache, mixed case searches", defaultGlobCache, "abCDe") b.Run("GetGlob", func(b *testing.B) { for i := 0; i < b.N; i++ { diff --git a/hugolib/pagecollections.go b/hugolib/pagecollections.go index 6f7d291bc69..b49669bb66c 100644 --- a/hugolib/pagecollections.go +++ b/hugolib/pagecollections.go @@ -57,7 +57,7 @@ func (c *PageCollections) AllPages() page.Pages { return c.allPages.get() } -// AllPages returns all regular pages for all languages. +// AllRegularPages returns all regular pages for all languages. func (c *PageCollections) AllRegularPages() page.Pages { return c.allRegularPages.get() } diff --git a/identity/identity.go b/identity/identity.go index 033409b807a..e73951caff3 100644 --- a/identity/identity.go +++ b/identity/identity.go @@ -20,7 +20,7 @@ import ( "sync/atomic" ) -// NewIdentityManager creates a new Manager starting at id. +// NewManager creates a new Manager starting at id. func NewManager(id Provider) Manager { return &identityManager{ Provider: id, diff --git a/lazy/init.go b/lazy/init.go index bfb9c4e0791..9a25e1e05f4 100644 --- a/lazy/init.go +++ b/lazy/init.go @@ -73,7 +73,7 @@ func (ini *Init) Branch(initFn func(context.Context) (any, error)) *Init { return ini.add(true, initFn) } -// BranchdWithTimeout is same as Branch, but with a timeout. +// BranchWithTimeout is same as Branch, but with a timeout. func (ini *Init) BranchWithTimeout(timeout time.Duration, f func(ctx context.Context) (any, error)) *Init { return ini.Branch(func(ctx context.Context) (any, error) { return ini.withTimeout(ctx, timeout, f)