mention

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mention finds the mentions in a message body: `@name` and `@role:R` written in text, outside code and links. It only reads text; which members a mention names is decided by the board, against its members when the message is posted.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ref

type Ref struct {
	Text string
	Name string
	Role string
}

Ref is one mention as written: Text is what the body says ("@codex" or "@role:reviewer"), and exactly one of Name and Role is set.

func Find

func Find(body string) []Ref

Find returns the mentions in body, in the order written, repeats included. Code (fenced blocks and inline code spans) and links are skipped; an "@" is a mention only where a word starts, so an email address or a "\@" isn't one.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL