|
16 | 16 | </a> |
17 | 17 |
|
18 | 18 | <a href="https://codecov.io/gh/atomicgo/assert"> |
19 | | -<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-1-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end --> |
| 19 | +<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-101-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end --> |
20 | 20 | </a> |
21 | 21 |
|
22 | 22 | <a href="https://opensource.org/licenses/MIT" target="_blank"> |
@@ -73,16 +73,88 @@ Package assert provides a set of assertion functions. |
73 | 73 |
|
74 | 74 | ## Index |
75 | 75 |
|
76 | | -- [func HelloWorld() string](<#func-helloworld>) |
| 76 | +- [func Equal[T any](a, b T) bool](<#func-equal>) |
| 77 | +- [func False(a bool) bool](<#func-false>) |
| 78 | +- [func Implements(a, iface any) bool](<#func-implements>) |
| 79 | +- [func Kind(a any, kind reflect.Kind) bool](<#func-kind>) |
| 80 | +- [func Nil(a any) bool](<#func-nil>) |
| 81 | +- [func Number(a any) bool](<#func-number>) |
| 82 | +- [func Panic(f func()) (panicked bool)](<#func-panic>) |
| 83 | +- [func True(a bool) bool](<#func-true>) |
| 84 | +- [func Zero(a any) bool](<#func-zero>) |
77 | 85 |
|
78 | 86 |
|
79 | | -## func [HelloWorld](<https://github.com/atomicgo/assert/blob/main/assert.go#L4>) |
| 87 | +## func [Equal](<https://github.com/atomicgo/assert/blob/main/assert.go#L6>) |
80 | 88 |
|
81 | 89 | ```go |
82 | | -func HelloWorld() string |
| 90 | +func Equal[T any](a, b T) bool |
83 | 91 | ``` |
84 | 92 |
|
85 | | -HelloWorld returns \`Hello, World\!\`. |
| 93 | +Equal compares two values and returns true if they are equal. |
| 94 | + |
| 95 | +## func [False](<https://github.com/atomicgo/assert/blob/main/assert.go#L50>) |
| 96 | + |
| 97 | +```go |
| 98 | +func False(a bool) bool |
| 99 | +``` |
| 100 | + |
| 101 | +False returns true if the value is false. |
| 102 | + |
| 103 | +## func [Implements](<https://github.com/atomicgo/assert/blob/main/assert.go#L60>) |
| 104 | + |
| 105 | +```go |
| 106 | +func Implements(a, iface any) bool |
| 107 | +``` |
| 108 | + |
| 109 | +Implements returns true if the value implements the interface. |
| 110 | + |
| 111 | +## func [Kind](<https://github.com/atomicgo/assert/blob/main/assert.go#L11>) |
| 112 | + |
| 113 | +```go |
| 114 | +func Kind(a any, kind reflect.Kind) bool |
| 115 | +``` |
| 116 | + |
| 117 | +Kind returns true if the value is of the given kind. |
| 118 | + |
| 119 | +## func [Nil](<https://github.com/atomicgo/assert/blob/main/assert.go#L16>) |
| 120 | + |
| 121 | +```go |
| 122 | +func Nil(a any) bool |
| 123 | +``` |
| 124 | + |
| 125 | +Nil returns true if the value is nil. |
| 126 | + |
| 127 | +## func [Number](<https://github.com/atomicgo/assert/blob/main/assert.go#L30>) |
| 128 | + |
| 129 | +```go |
| 130 | +func Number(a any) bool |
| 131 | +``` |
| 132 | + |
| 133 | +Number returns true if the value is a number. |
| 134 | + |
| 135 | +## func [Panic](<https://github.com/atomicgo/assert/blob/main/assert.go#L74>) |
| 136 | + |
| 137 | +```go |
| 138 | +func Panic(f func()) (panicked bool) |
| 139 | +``` |
| 140 | + |
| 141 | +Panic returns true if the function panics. |
| 142 | + |
| 143 | +## func [True](<https://github.com/atomicgo/assert/blob/main/assert.go#L45>) |
| 144 | + |
| 145 | +```go |
| 146 | +func True(a bool) bool |
| 147 | +``` |
| 148 | + |
| 149 | +True returns true if the value is true. |
| 150 | + |
| 151 | +## func [Zero](<https://github.com/atomicgo/assert/blob/main/assert.go#L55>) |
| 152 | + |
| 153 | +```go |
| 154 | +func Zero(a any) bool |
| 155 | +``` |
| 156 | + |
| 157 | +Zero returns true if the value is the zero value. |
86 | 158 |
|
87 | 159 |
|
88 | 160 |
|
|
0 commit comments