@xiangli-cmu I wrote an assertion function for Bolt that I liked quite a bit. It condenses these down to one line and doesn't cause you to have unreachable lines when doing code coverage.

https://github.com/boltdb/bolt/blob/2b5e4403161acec06c169ce286b2761ee96a2ce1/assert.go

Then all you need to do is:

```go
func doSomething() {
    _assert(term > s.currentTerm, "updateCurrentTerm() is called when term (%d) is not larger than current term (%d)", term, s.currentTerm)
}
```

I had to prefix with an underscore since it conflicts with testify's assert package.