Skip to content

Commit edd4c75

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents d692e8b + 0346905 commit edd4c75

1 file changed

Lines changed: 46 additions & 1 deletion

File tree

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</a>
1717

1818
<a href="https://codecov.io/gh/atomicgo/assert">
19-
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-101-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
19+
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-129-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
2020
</a>
2121

2222
<a href="https://opensource.org/licenses/MIT" target="_blank">
@@ -73,6 +73,10 @@ Package assert provides a set of assertion functions.
7373

7474
## Index
7575

76+
- [func Contains[T any](s []T, v T) bool](<#func-contains>)
77+
- [func ContainsAll[T any](s []T, v []T) bool](<#func-containsall>)
78+
- [func ContainsAny[T any](s []T, v []T) bool](<#func-containsany>)
79+
- [func ContainsNone[T any](s []T, v []T) bool](<#func-containsnone>)
7680
- [func Equal[T any](a, b T) bool](<#func-equal>)
7781
- [func False(a bool) bool](<#func-false>)
7882
- [func Implements(a, iface any) bool](<#func-implements>)
@@ -81,9 +85,42 @@ Package assert provides a set of assertion functions.
8185
- [func Number(a any) bool](<#func-number>)
8286
- [func Panic(f func()) (panicked bool)](<#func-panic>)
8387
- [func True(a bool) bool](<#func-true>)
88+
- [func Unique[T any](s []T) bool](<#func-unique>)
8489
- [func Zero(a any) bool](<#func-zero>)
8590

8691

92+
## func [Contains](<https://github.com/atomicgo/assert/blob/main/assert.go#L101>)
93+
94+
```go
95+
func Contains[T any](s []T, v T) bool
96+
```
97+
98+
Contains returns true if the slice contains the value. Items are considered equal if they are deep equal.
99+
100+
## func [ContainsAll](<https://github.com/atomicgo/assert/blob/main/assert.go#L114>)
101+
102+
```go
103+
func ContainsAll[T any](s []T, v []T) bool
104+
```
105+
106+
ContainsAll returns true if the slice contains all the values. Items are considered equal if they are deep equal.
107+
108+
## func [ContainsAny](<https://github.com/atomicgo/assert/blob/main/assert.go#L134>)
109+
110+
```go
111+
func ContainsAny[T any](s []T, v []T) bool
112+
```
113+
114+
ContainsAny returns true if the slice contains any of the values. Items are considered equal if they are deep equal.
115+
116+
## func [ContainsNone](<https://github.com/atomicgo/assert/blob/main/assert.go#L149>)
117+
118+
```go
119+
func ContainsNone[T any](s []T, v []T) bool
120+
```
121+
122+
ContainsNone returns true if the slice contains none of the values. Items are considered equal if they are deep equal.
123+
87124
## func [Equal](<https://github.com/atomicgo/assert/blob/main/assert.go#L6>)
88125

89126
```go
@@ -148,6 +185,14 @@ func True(a bool) bool
148185

149186
True returns true if the value is true.
150187

188+
## func [Unique](<https://github.com/atomicgo/assert/blob/main/assert.go#L86>)
189+
190+
```go
191+
func Unique[T any](s []T) bool
192+
```
193+
194+
Unique returns true if the slice contains unique values. Items are considered unique if they are not deep equal.
195+
151196
## func [Zero](<https://github.com/atomicgo/assert/blob/main/assert.go#L55>)
152197

153198
```go

0 commit comments

Comments
 (0)