Merge PR #4832: print all failed invariants only

This commit is contained in:
colin axner
2019-08-05 14:21:44 -04:00
committed by Alexander Bezobchuk
parent a73b3f5e97
commit 865d473eb4
8 changed files with 16 additions and 21 deletions
+3 -5
View File
@@ -16,9 +16,7 @@ type InvariantRegistry interface {
RegisterRoute(moduleName, route string, invar Invariant)
}
// FormatInvariant returns a standardized invariant message along with
// a boolean indicating whether the invariant has been broken.
func FormatInvariant(module, name, msg string, broken bool) (string, bool) {
return fmt.Sprintf("%s: %s invariant\n%sinvariant broken: %v\n",
module, name, msg, broken), broken
// FormatInvariant returns a standardized invariant message.
func FormatInvariant(module, name, msg string) string {
return fmt.Sprintf("%s: %s invariant\n%s\n", module, name, msg)
}