Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zostay committed Jun 13, 2024
1 parent 6000e45 commit 789b3c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fs/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package fs

import "io/fs"

// ReaderFS combines all teh reader file system interfaces into a single
// ReaderFS combines all the reader file system interfaces into a single
// interface for convenience.
type ReaderFS interface {
fs.GlobFS
Expand Down
6 changes: 2 additions & 4 deletions slices/manipulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,8 @@ func Unshift[T any](slice []T, vs ...T) []T {
for range vs {
slice = append(slice, zero)
}
copy(slice[len(vs):], slice[:])
for i, v := range vs {
slice[i] = v
}
copy(slice[len(vs):], slice)
copy(slice, vs)
return slice
}

Expand Down
2 changes: 1 addition & 1 deletion slices/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func FirstIndex[T any](in []T, pred func(t T) bool) int {
return -1
}

// FirstOr returns the first tiem that matches the predicate. If nothing
// FirstOr returns the first time that matches the predicate. If nothing
// matches, the missed value is returned.
func FirstOr[T any](in []T, missed T, pred func(t T) bool) T {
for _, t := range in {
Expand Down

0 comments on commit 789b3c2

Please sign in to comment.