An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

gitlab.com/stone.code/assert

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.

Ecosystem
proxy.golang.org
Latest Release
v1.1.4
over 3 years ago
Versions
22
Dependent Packages
2
Dependent Repos
2
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/gitlab.com/stone.code/assert
spec
License BSD-3-Clause
Namespace gitlab.com/stone.code
First Release about 4 years ago
Last Synced 24 days ago
Keywords
assert errors go
Repository
Stars 1 on gitlab.com
Forks 0 on gitlab.com
Rankings on proxy.golang.org
Dependent packages Top 4.2%
Dependent repos Top 3.5%