payee
typepayee is a single share holder inside a group.
Value
v0.payee
group
typegroup is one payment-splitting arrangement.
Value
v0.group
groups
v0.Tree// id (zero-padded string) -> \*group
- OID
- 020f0b…b32b:4
groups details
nextID
intValue
0
errEmpty
*errors.errorString- OID
- 020f0b…b32b:7
errEmpty details
Register
func(payees string, shares string) intRegister creates a new group from comma-separated payees and shares. payees: "g1abc...,g1def..." (addresses) shares: "3,1" (positive integers, same count as payees) Returns the new group id. Panics on malformed input.
- OID
- 020f0b…b32b:9
Register details
RecordIncome
func(id int, amount int)RecordIncome adds amount to the pool of group id. amount must be positive.
- OID
- 020f0b…b32b:11
RecordIncome details
Render
func(path string) stringRender shows all groups, their payees, shares, and computed owed amounts.
- OID
- 020f0b…b32b:12
Render details
splitTrim
func(s string) []stringsplitTrim splits on commas and trims whitespace around each element.
- OID
- 020f0b…b32b:13
splitTrim details
key
func(id int) stringkey produces a zero-padded, lexicographically-sortable avl key for an id, so Render iterates groups in ascending numeric order.
- OID
- 020f0b…b32b:14
key details
payee
:
type
=v0.payee
group
:
type
=v0.group
groups : v0.Tree Inspect
nextID
:
int
=0