maxMsgLen
untyped bigintmaxMsgLen is the maximum length (in bytes) of a single post.
Value
(280 <untyped> bigint)
pageSize
untyped bigintpageSize is how many posts a single Render page shows.
Value
(20 <untyped> bigint)
post
typepost is a single microblog entry.
Value
v0.post
posts
[]v0.postposts is the append-only wall, in chronological (oldest-first) order. Render reverses this view to show newest-first.
Value
<zero>
Post
func(msg string)Post publishes msg to the wall. It is a crossing function: callers invoke it with Post(cross(cur), "hello"). It panics if msg is empty or longer than maxMsgLen bytes.
- OID
- 0fe833…b447:4
Post details
Count
func() intCount returns the total number of posts on the wall.
- OID
- 0fe833…b447:6
Count details
Render
func(path string) stringRender renders the wall as Markdown, newest-first, pageSize posts per page. The page is parsed from path: "?page=N", "?p=N", "/N", or a bare "N" all select page N (1-indexed). Anything else defaults to page 1.
- OID
- 0fe833…b447:7
Render details
renderNav
func(page int, pages int) stringrenderNav builds a simple prev/next navigation footer as Markdown links.
- OID
- 0fe833…b447:8
renderNav details
parsePage
func(path string) intparsePage extracts the 1-indexed page number from a Render path. It accepts "?page=N", "?p=N", "/N", and a bare "N". Unrecognized input yields page 1.
- OID
- 0fe833…b447:9
parsePage details
shortAddr
func(addr string) stringshortAddr abbreviates a bech32 address for display: g1abcd…wxyz.
- OID
- 0fe833…b447:10
shortAddr details
escapeInline
func(s string) stringescapeInline neutralizes characters that would break the Markdown list item layout (newlines collapse to spaces; leading markers are defused).
- OID
- 0fe833…b447:11