Skip to content

Commit 44fd6c9

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 8c1760d + 8900b33 commit 44fd6c9

1 file changed

Lines changed: 77 additions & 5 deletions

File tree

README.md

Lines changed: 77 additions & 5 deletions
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-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 -->
2020
</a>
2121

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

7474
## Index
7575

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>)
7785

7886

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>)
8088

8189
```go
82-
func HelloWorld() string
90+
func Equal[T any](a, b T) bool
8391
```
8492

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.
86158

87159

88160

0 commit comments

Comments
 (0)