proxy.golang.org : github.com/negrel/assert
Package assert provides a set of comprehensive debug assertions. The following is a complete example using assert in a function: Debug assertions are programming statements that help developers catch logical errors during development by verifying assumptions about the program's state. They're typically used to check conditions that should always be true during normal program execution. If the condition is false, the assertions is either wrong or there is a programming error. In both case, program panics if it was compiled with the `assert` tags (`go build -tags assert ./path/to/my/package`) Every assertion function also takes an optional string message as the final argument, allowing custom error messages to be appended to the message the assertion method outputs.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/negrel/assert
Keywords:
assert
, debug
, go
, golang
License: MIT
Latest release: 5 months ago
First release: over 1 year ago
Namespace: github.com/negrel
Stars: 27 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago