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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 state

Back to all declarations

entry

type

entry is the persisted record for a single alias.

Value

v0.entry

aliases

v0.Tree

aliases maps alias (string) -> \*entry, kept in an avl.Tree for deterministic iteration order in Render.

Open
OID
0711fd…a810:4
aliases details

Inspect ref

isAlphanumeric

func(s string) bool

isAlphanumeric reports whether s is non-empty and made only of \[0-9A-Za-z].

Open
OID
0711fd…a810:5
isAlphanumeric details

Inspect func

Shorten

func(alias string, url string, note string)

Shorten registers \`alias -> url\` owned by the caller. Rules: - alias must be non-empty and alphanumeric; - url must be non-empty; - if the alias is unclaimed, it is created owned by the caller; - if it is already claimed by the caller, the url/note are updated; - if it is claimed by someone else, the call aborts.

Open
OID
0711fd…a810:7
Shorten details

Inspect func

Remove

func(alias string)

Remove deletes an alias owned by the caller. Aborts if the alias does not exist or the caller is not the owner.

Open
OID
0711fd…a810:8
Remove details

Inspect func

Lookup

func(alias string) (string, bool)

Lookup returns the target url for an alias and whether it exists. It is a read-only helper and does NOT increment the click counter.

Open
OID
0711fd…a810:9
Lookup details

Inspect func

Render

func(path string) string

Render renders Markdown. The root path lists every alias; "/\<alias>" shows a single alias detail and bumps its click counter.

Open
OID
0711fd…a810:10
Render details

Inspect func

short

func(s string) string

short truncates a long address for the index table.

Open
OID
0711fd…a810:12
short details

Inspect func

itoa

func(n int) string

itoa converts a non-negative int to its decimal string without importing strconv (kept minimal & deterministic).

Open
OID
0711fd…a810:13
itoa details

Inspect func
entry : type =v0.entry
aliases : v0.Tree Inspect
isAlphanumeric : func(s string) bool Inspect
Shorten : func(alias string, url string, note string) Inspect
Remove : func(alias string) Inspect
Lookup : func(alias string) (string, bool) Inspect
Render : func(path string) string Inspect
renderIndex : func() string Inspect
short : func(s string) string Inspect
itoa : func(n int) string Inspect