AssertTrue asserts that b is true. Otherwise, it would log fatal.
(b bool)
| 81 | |
| 82 | // AssertTrue asserts that b is true. Otherwise, it would log fatal. |
| 83 | func AssertTrue(b bool) { |
| 84 | if !b { |
| 85 | log.Fatalf("%+v", errors.Errorf("Assert failed")) |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | // AssertTruef is AssertTrue with extra info. |
| 90 | func AssertTruef(b bool, format string, args ...interface{}) { |