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

github.com/gravitton/assert

Package assert provides a simple and lightweight testing assertion library for Go. This package offers a collection of assertion functions that can be used with any testing framework that implements the Testing interface (such as Go's standard testing.T). The assertions are designed to be intuitive and provide clear error messages when tests fail. The assert package works with any type that implements the Testing interface: • True/False: Assert boolean values • Equal/NotEqual: Assert value equality using reflect.DeepEqual • Same/NotSame: Assert pointer identity (same memory address) • Fail/Failf: Manually fail tests with custom messages All assertion functions provide detailed error messages when assertions fail, including actual and expected values formatted with Go's %#v verb for maximum clarity. All assertion functions automatically call t.helper() if the testing type implements the helper interface, ensuring that test failures point to the correct line in your test code rather than inside the assertion library. All assertion functions return a boolean indicating success (true) or failure (false), allowing for conditional test logic if needed.

Ecosystem
proxy.golang.org
Latest Release
v1.0.0
4 months ago
Versions
7
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/gravitton/assert
spec
License MIT
Namespace github.com/gravitton
First Release 7 months ago
Last Synced 24 days ago
Repository
Stars 1 on GitHub
Forks 0 on GitHub
Rankings on proxy.golang.org
Overall Top 5.4%