topic
typetopic holds the tallies and the set of callers who already reacted.
Value
v0.topic
topics
*v0.Treetopics maps topic name -> \*topic, kept in an avl.Tree for deterministic order.
- OID
- 0bcd49…687a:4
topics details
getOrPanic
func(name string) *v0.topic- OID
- 0bcd49…687a:6
getOrPanic details
newTopic
func(name string) *v0.topic- OID
- 0bcd49…687a:8
newTopic details
CreateTopic
func(name string)CreateTopic registers a new empty topic. It is optional: React auto-creates a topic if it does not exist yet. Panics if the topic already exists or the name is empty.
- OID
- 0bcd49…687a:9
CreateTopic details
React
func(name string, emoji string)React adds the caller's reaction (an emoji) to a topic. Each caller may react at most once per topic. The topic is created on demand if missing. Panics on empty input or when the caller has already reacted to this topic.
- OID
- 0bcd49…687a:10
React details
TopicCount
func() intTopicCount returns the number of topics on the board.
- OID
- 0bcd49…687a:11
TopicCount details
emojiTally
typeemojiTally is used to sort a topic's tallies deterministically.
Value
v0.emojiTally
byCountDesc
typebyCountDesc sorts tallies by count descending, then emoji ascending.
Value
v0.byCountDesc
Render
func(path string) stringRender returns a Markdown view of the board. If path is a non-empty topic name, only that topic is shown; otherwise all topics are listed.
- OID
- 0bcd49…687a:12