{"id":44643699,"url":"https://github.com/strongo/decimal","last_synced_at":"2026-02-14T19:10:07.634Z","repository":{"id":57497613,"uuid":"76712952","full_name":"strongo/decimal","owner":"strongo","description":"Decimal(64) implementation in GoLang based on int64 to keep money amounts","archived":false,"fork":false,"pushed_at":"2024-05-09T10:04:04.000Z","size":25,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-16T09:28:07.271Z","etag":null,"topics":["decimal","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strongo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-17T08:34:51.000Z","updated_at":"2024-05-29T13:59:55.000Z","dependencies_parsed_at":"2024-05-09T11:27:40.210Z","dependency_job_id":null,"html_url":"https://github.com/strongo/decimal","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/strongo/decimal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongo%2Fdecimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongo%2Fdecimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongo%2Fdecimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongo%2Fdecimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strongo","download_url":"https://codeload.github.com/strongo/decimal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongo%2Fdecimal/sbom","scorecard":{"id":855627,"data":{"date":"2025-08-11","repo":{"name":"github.com/strongo/decimal","commit":"fe16035b6420297f01e2c7ceb503e24f83e51de0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:23","Warn: no topLevel permission defined: .github/workflows/ci.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/strongo/decimal/ci.yml/main?enable=pin","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T23:50:35.775Z","repository_id":57497613,"created_at":"2025-08-23T23:50:35.776Z","updated_at":"2025-08-23T23:50:35.776Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29452750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decimal","go","golang"],"created_at":"2026-02-14T19:10:07.038Z","updated_at":"2026-02-14T19:10:07.616Z","avatar_url":"https://github.com/strongo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Package `github.com/strongo/decimal`\n\n[![Go CI](https://github.com/strongo/decimal/actions/workflows/ci.yml/badge.svg)](https://github.com/strongo/decimal/actions/workflows/ci.yml)\n[![GoDoc](https://godoc.org/github.com/strongo/decimal?status.svg)](https://godoc.org/github.com/strongo/decimal)\n[![Go Report](https://goreportcard.com/badge/github.com/strongo/decimal)](https://goreportcard.com/report/github.com/strongo/decimal)\n\nDecimal 64 bit numbers implementation to represent money values in GoLang. Based on int64. Supports JSON (un)marshalling.\n\nAt the moment provides just a single type `Decimal64p2` with fixed precision of 2 digits after point.\nIn simple words it stores value as 64 bits integer amount of cents.\n\nThe code has \u003cb\u003e100% unit tests coverage\u003c/b\u003e.\n\nE.g. `1.43` will be stored as `int64(143)` but when rendered as string will be represented as `\"1.43\"`.\n\n \n```go\npackage example\n\nimport \"github.com/strongo/decimal\"\n\nfunc Example() {\n\tvar amount decimal.Decimal64p2; print(amount)  // 0\n\t\n\tamount = decimal.NewDecimal64p2(0, 43); print(amount)  // 0.43\n\tamount = decimal.NewDecimal64p2(1, 43); print(amount)  // 1.43\n\tamount = decimal.NewDecimal64p2FromFloat64(23.100001); print(amount)  // 23.10\n\tamount, _ = decimal.ParseDecimal64p2(\"2.34\"); print(amount)  // 2.34\n\tamount, _ = decimal.ParseDecimal64p2(\"-3.42\"); print(amount)  // -3.42\n}\n```\n\nThis package originally was developed for \u003ca href=\"https://debtstrcker.io/\"\u003e\u003cb\u003eDebtsTracker.io\u003c/b\u003e\u003c/a\u003e - a mobile app \u0026 chat bots to \u003cb\u003esplit bills \u0026 track your debts\u003c/b\u003e.\n\n## Reasoning\n* Fast\n* Compact\n* No precision issues with storing values like `0.10`\n* By storing with precision to cents there is no ambiguity with rounding. E.g. if you split $10 between 3 persons the amounts will be $3.33, $3.33 \u0026 $3.3\u003cb\u003e4\u003c/b\u003e.\n\n## \u003ca href=\"https://github.com/strongo/decimal/blob/master/LICENSE\"\u003eMIT License\u003c/a\u003e\nFree to use without restrictions. If cloned please keep links to \u003ca href=\"https://github.com/strongo/decimal\"\u003ehttps://github.com/strongo/decimal\u003c/a\u003e and to \u003ca href=\"https://debtstracker.io/\"\u003ehttps://debtstracker.io/\u003c/a\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrongo%2Fdecimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrongo%2Fdecimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrongo%2Fdecimal/lists"}