Prerequisites
Before buildingunispeedtest, ensure you have:
- Go 1.26 or later - Check your version with
go version - Git - For cloning the repository
Clone the Repository
Clone the source code from GitHub:Build the Binary
Build an optimized production binary:-trimpathremoves file system paths from the binary for reproducible builds-ldflags="-s -w"strips debug information to reduce binary size-o dist/unispeedtestoutputs the binary to thedist/directory./cmd/unispeedtestspecifies the main package location
dist/unispeedtest.
Development Build
For faster development builds without optimization:Running Tests
Run the full test suite:Local Development Workflow
- Make changes to the source code
- Run tests to verify your changes:
- Build locally to test the binary:
- Test the binary:
- Disable color output during development if needed:
Installing Locally
Install the binary to your$GOPATH/bin:
$GOPATH/bin is in your PATH to run unispeedtest from anywhere.