Skip to content

Commit

Permalink
fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: cui fliter <imcusg@gmail.com>
  • Loading branch information
cuishuang committed Apr 25, 2023
1 parent 0cb6ca5 commit 3904300
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helpers/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions hugofs/glob/glob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++ {
Expand Down
2 changes: 1 addition & 1 deletion hugolib/pagecollections.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion identity/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lazy/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3904300

Please sign in to comment.