Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Tests

on:
push:
branches: [main]
pull_request:

permissions:
Expand Down
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
files := $(shell find . -name "*.go" | grep -v vendor)

GOLINT_VERSION := v0.0.0-20241112194109-818c5a804067
GOIMPORTS_VERSION := v0.24.0
STATICCHECK_VERSION := 2024.1.1

bootstrap:
go install -v golang.org/x/lint/golint@latest
go install -v golang.org/x/tools/...@latest
go install -v honnef.co/go/tools/cmd/staticcheck@latest
go install -v golang.org/x/lint/golint@$(GOLINT_VERSION)
go install -v golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION)
go install -v honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION)

lint:
golint -set_exit_status
staticcheck github.com/sdcoffey/big
staticcheck ./...

clean:
fmt:
goimports -w $(files)

test: clean
go test -v
test:
go test -v ./...

release: clean test
./scripts/release.sh
release: fmt test
./scripts/release.sh
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# BIG

Big is a simple, immuatable wrapper around golang's built-in `*big.Float` type desinged to offer a more user-friendly API and immutability guarantees at the cost of some runtime performance.
Big is a simple, immutable wrapper around Go's built-in `*big.Float` type designed to offer a more user-friendly API and immutability guarantees at the cost of some runtime performance.

Because Big wraps `*big.Float`, it uses arbitrary-precision binary floating-point arithmetic. It is not a fixed-point decimal or money library. If you need decimal-exact financial arithmetic, use a decimal package with explicit scale and rounding semantics.

### Example

Expand Down
Loading