mirror of
https://github.com/pushbits/server.git
synced 2025-05-23 22:06:34 +02:00
Partially implement updates of models
This commit is contained in:
parent
6a77df8373
commit
d621333b6e
9 changed files with 158 additions and 19 deletions
12
assert/assert.go
Normal file
12
assert/assert.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package assert
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Assert panics if condition is false.
|
||||
func Assert(condition bool) {
|
||||
if !condition {
|
||||
panic(errors.New("assertion failed"))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue