1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-22 03:13:33 +01:00
ntfy/util
Michael Manganiello ebd4367dda Fix false positive in ContainsAll function
As the `ContainsAll` is working with a match counter, it could return
a false positive when the `haystack` slice contains duplicate elements.

This can be checked with the included testing scenario, with
`haystack = [1, 1]` and `needles = [1, 2]`. Iterating over the haystack
to check for items to be present in needles will increase the match
counter to 2, even if `2` is not present in the first slice.
2023-05-12 09:51:47 -03:00
..
embedfs
batching_queue.go
batching_queue_test.go
content_type_writer.go
content_type_writer_test.go
embedfs.go
embedfs_test.go
gzip_handler.go
gzip_handler_test.go Gzip static responses 2022-03-10 21:55:56 -05:00
limit.go
limit_test.go
lookup_cache.go
lookup_cache_test.go Fix a bunch of FIXMEs 2023-01-18 15:50:06 -05:00
peek.go
peek_test.go
time.go Add visitor_seen to the log context 2023-03-03 13:56:48 -05:00
time_test.go
util.go Fix false positive in ContainsAll function 2023-05-12 09:51:47 -03:00
util_test.go Fix false positive in ContainsAll function 2023-05-12 09:51:47 -03:00