Help us shape the future of Go! Take the 2026 Go Developer Survey

mention

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Result []Mention
	// contains filtered or unexported fields
}

Collector builds a deduplicated list of Mention entries.

func NewCollector

func NewCollector() *Collector

NewCollector creates a new Collector.

func (*Collector) AddMentionableTeams

func (c *Collector) AddMentionableTeams(ctx context.Context, doer, owner *user_model.User) error

AddMentionableTeams loads and adds team mentions for the given owner (if it's an org).

func (*Collector) AddUsers

func (c *Collector) AddUsers(ctx context.Context, users []*user_model.User)

AddUsers adds user mentions, skipping duplicates.

type Mention

type Mention struct {
	Key      string `json:"key"`
	Value    string `json:"value"`
	Name     string `json:"name"`
	FullName string `json:"fullname"`
	Avatar   string `json:"avatar"`
}

Mention is the JSON structure returned by mention autocomplete endpoints.

Jump to

Keyboard shortcuts

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