# 🐢 Bumert - A Fluent Assertion Library for Go



## Overview
Bumert is a fluent assertion library designed specifically for Go. It allows developers to write clear and concise assertions in their tests. What sets Bumert apart is its ability to compile to no-ops in production builds, ensuring zero overhead when you need performance. You can enable this feature using the `debug` build tag.
## Key Features
- **Fluent API**: Write assertions in a clear, readable manner.
- **Zero Overhead**: Compiles to no-ops in production.
- **Conditional Compilation**: Use the `debug` build tag to include assertions in your testing environment without affecting production performance.
- **Developer Tools**: Streamline your testing process and improve code quality with ease.
## Topics
- Assertions
- Build Tags
- Conditional Compilation
- Debugging
- Developer Tools
- Fluent API
- Go
- Golang
- Test Utilities
- Testing
- Zero Overhead
## Installation
To get started with Bumert, you can install it using `go get`:
```bash
go get github.com/om81/bumert
Here's a simple example of how to use Bumert in your Go tests:
package main
import (
"testing"
"github.com/om81/bumert"
)
func TestSomething(t *testing.T) {
result := 2 + 2
bumert.Assert(t, result).Equals(4)
}
To include assertions in your development environment, use the debug
build tag when building or testing:
go test -tags debug
For detailed documentation on all available assertions and usage patterns, please check the Wiki.
You can find the latest releases of Bumert here. Make sure to download and execute the appropriate files for your setup.
We welcome contributions! To contribute to Bumert, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries or issues, feel free to reach out via GitHub issues or email at [your-email@example.com].
- Thanks to the Go community for their contributions and support.
- Inspired by other testing libraries and frameworks.
Bumert is a community-driven project. If you're interested in improving Bumert, we encourage you to participate in discussions, report bugs, and suggest new features. Your feedback is invaluable.
Bumert provides a fluent API that enhances readability and clarity. The zero overhead feature ensures that your production code remains performant without compromising on the quality of your tests.
Absolutely! Bumert integrates seamlessly into any Go project. Just install it using go get
and start using its assertions in your tests.
If you don’t use the debug
tag, the assertions will not compile, resulting in no additional runtime overhead in your production builds.
Yes, we strive to keep Bumert updated with the latest best practices and Go features. Regular updates and community contributions help maintain its relevance.
Here are some examples of assertions you can make using Bumert:
// Assert that a number is equal to another number
bumert.Assert(t, 1).Equals(1)
// Assert that a string contains another string
bumert.Assert(t, "hello world").Contains("world")
// Assert that an error is nil
err := someFunction()
bumert.Assert(t, err).IsNil()
Bumert is designed to make your testing experience in Go easier and more efficient. With its fluent API and zero overhead, you can write clear assertions without worrying about performance in production. Join the community today, and make your tests better with Bumert!