{"id":36443207,"url":"https://github.com/5000k/goodice","last_synced_at":"2026-01-11T22:01:04.010Z","repository":{"id":318084911,"uuid":"1069934319","full_name":"5000K/goodice","owner":"5000K","description":"A good, minimal ttrpg dice library for golang.","archived":false,"fork":false,"pushed_at":"2025-10-19T15:12:58.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-19T21:24:47.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/5000K.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T23:05:22.000Z","updated_at":"2025-10-19T15:12:46.000Z","dependencies_parsed_at":"2025-10-05T01:18:08.743Z","dependency_job_id":"f0fb71dd-7760-46fc-a723-6e73173020c5","html_url":"https://github.com/5000K/goodice","commit_stats":null,"previous_names":["5000k/goodice"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/5000K/goodice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5000K%2Fgoodice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5000K%2Fgoodice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5000K%2Fgoodice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5000K%2Fgoodice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5000K","download_url":"https://codeload.github.com/5000K/goodice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5000K%2Fgoodice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-01-11T22:01:03.267Z","updated_at":"2026-01-11T22:01:04.001Z","avatar_url":"https://github.com/5000K.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goodice\n\n[![Go](https://github.com/5000K/goodice/actions/workflows/go.yml/badge.svg)](https://github.com/5000K/goodice/actions/workflows/go.yml)\n\nA good, minimal, efficient go rpg-like dice library.\nStraight to the point.\n\n`go get github.com/5000k/goodice`\n\n## Basic Usage\n\n```go\npackage main\n\nimport (\n\t\"github.com/5000K/goodice\"\n)\n\nfunc main(){\n\tresult, err := goodice.Generate(\"D20\")\n\tprintln(result.Result)\n\t\n\tresult2, err := goodice.GenerateSeeded(\"3D20-2D8+12\", 1337)\n\tprintln(result2.Result) // total\n\tprintln(result2.Parts) // contains the result of each dice roll plus all constants\n}\n```\n\n\n\n## Supported dice notation\nThe parser accepts the standard TTRPG dice notation. It has two main parts: constants and dice rolls\n\nA constant is an integer number (e.g. `7` or `42` - I think you know what an integer is)\n\nDice rolls are in the form of XdY, where:\n- X is an optional integer, **How many dice to roll**. If not provided, 1 die is assumed.\n- d simply is \"d\" or \"D\"\n- Y is the amount of sides each die has (e.g. 20 for a D20)\n\nSo `D20`, `d20` and `1d20` will all do the same.\n\nThe parts can be chained together with the operators + and - (add and subtract). The whole string will be evaluated from left to right, just like you would when calculating it by hand.\n\n## Reusing parsed scripts\nIf you are going to use a script many times, it will be more efficient to reuse a Goodice instance.\nFor this, you'll create an instance with `goodice.New(script: string)`. This will parse your script. You can then repeatedly call `Generate()` or `GenerateSeeded(seed:int)` on the instance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5000k%2Fgoodice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5000k%2Fgoodice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5000k%2Fgoodice/lists"}