Documentation ¶ Overview ¶ Copyright (C) 2026 Cryptic Codex LLC SPDX-License-Identifier: GPL-3.0-or-later Index ¶ type Result type Roll func Parse(s string) (Roll, error) func (r Roll) Roll() Result Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Result ¶ type Result struct { Rolls []int Total int } type Roll ¶ type Roll struct { Count, Sides, Modifier int } func Parse ¶ func Parse(s string) (Roll, error) Parse parses a string in the format of "<C>d<S> +/- <M>" to create a roll object. This function trims whitespace, only allows for one use of the die designator 'd', and disallows (for now) multiplication or division modifiers func (Roll) Roll ¶ func (r Roll) Roll() Result Source Files ¶ View all Source files dice.go Click to show internal directories. Click to hide internal directories.