Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v1 state

Back to all declarations

payee

type

payee is a single share holder inside a group.

Value

v1.payee

group

type

group is one payment-splitting arrangement. It carries no id field: the id belongs to the store, which hands it back on lookup and iteration.

Value

v1.group

Register

func(payees string, shares string) int

Register 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.

Open
OID
0a6a3e…fc66:10
Register details

Inspect func

RecordIncome

func(id int, amount int)

RecordIncome adds amount to the pool of group id. amount must be positive.

Open
OID
0a6a3e…fc66:12
RecordIncome details

Inspect func

Render

func(path string) string

Render shows all groups, their payees, shares, and computed owed amounts.

Open
OID
0a6a3e…fc66:13
Render details

Inspect func

splitTrim

func(s string) []string

splitTrim splits on commas and trims whitespace around each element.

Open
OID
0a6a3e…fc66:14
splitTrim details

Inspect func
payee : type =v1.payee
group : type =v1.group
groups : *v0.Store Inspect
errEmpty : *errors.errorString Inspect
Register : func(payees string, shares string) int Inspect
RecordIncome : func(id int, amount int) Inspect
Render : func(path string) string Inspect
splitTrim : func(s string) []string Inspect