gitlab.com/stone.code/assert (go): Package assert provide a single function to emulate C-style asserts.  The goal of this package is to provide a call that will document and enforce preconditions, postconditions, and invariants in code.  Failures should only result from program bugs.  This package should not be used to replace proper error handling.  Each assertion documents that a predicate is true when the the assertion is executed. Depending on the build, that predicate might also be enforced (i.e. by terminating the program, or, more gently, by panicking). There are three types of assertion:  (1) preconditions, which document conditions (specified as predicates) for calling a function, (2) postconditions, which document conditions at the end of a function, and (3) invariant, which specify conditions over a particular scope or for a type.  If the predicate for an assertion is false, this conditions indicates a bug in the code (as opposed to a transient or run-time error).  When enforced, assertions are a debugging tool.
Keywords: assert|errors|go