Assert will panic with a given formatted message if the given condition is false.
(condition bool, msg string, v ...any)
| 61 | |
| 62 | // Assert will panic with a given formatted message if the given condition is false. |
| 63 | func Assert(condition bool, msg string, v ...any) { |
| 64 | if !condition { |
| 65 | panic(fmt.Sprintf("assertion failed: "+msg, v...)) |
| 66 | } |
| 67 | } |
no outgoing calls