Skip to content

Commit 673c831

Browse files
committed
updated pre-commit
1 parent 3d07653 commit 673c831

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.2.0
3+
rev: v4.3.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- id: check-added-large-files
99
- repo: https://github.com/pre-commit/mirrors-prettier
10-
rev: "v2.6.2"
10+
rev: "v2.7.1"
1111
hooks:
1212
- id: prettier
1313
- repo: https://github.com/golangci/golangci-lint
14-
rev: "v1.45.2"
14+
rev: "v1.47.0"
1515
hooks:
1616
- id: golangci-lint

maputils/maputils.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ func ForEach[K comparable, V any](mapInstance map[K]V, function func(key K, valu
5656
// Note: this function will modify the passed in map. To get a different object, use the Copy function to pass a copy to this function.
5757
func Drop[K comparable, V any](mapInstance map[K]V, keys []K) map[K]V {
5858
for _, key := range keys {
59-
if _, keyExists := mapInstance[key]; keyExists {
60-
delete(mapInstance, key)
61-
}
59+
delete(mapInstance, key)
6260
}
6361

6462
return mapInstance

sliceutils/sliceutils.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ func Every[T any](slice []T, predicate func(value T, index int, slice []T) bool)
169169
// i.e. first the elements of the first slice, then that of the second and so forth.
170170
func Merge[T any](slices ...[]T) (mergedSlice []T) {
171171
for _, slice := range slices {
172-
for _, el := range slice {
173-
mergedSlice = append(mergedSlice, el)
174-
}
172+
mergedSlice = append(mergedSlice, slice...)
175173
}
176174
return mergedSlice
177175
}

0 commit comments

Comments
 (0)