Registry / utility / johncgriffin-overflow

johncgriffin-overflow

JSON →
library0.0.0-20211019200055-46fa312c352cgogounverified

Provides checked integer arithmetic operations that panic or return errors on overflow.

go get github.com/JohnCGriffin/overflow
INSTALL
IMPORT
SIG · JOHNCGRIFFIN-OVERF
J
johncgriffin-overflow
utilitygov0.0.0-20211019200055-46fa312c352c
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

overflow
github.com/JohnCGriffin/overflow

Demonstrates safe addition with overflow detection.

package main import ( "fmt" "github.com/JohnCGriffin/overflow" ) func main() { sum, ok := overflow.Add(1<<62, 1<<62) if !ok { fmt.Println("overflow detected") } else { fmt.Println("sum:", sum) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20211019200055-46fa312c352clatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
johncgriffin-overflow — go get johncgriffin-overflow · libregistry